Send and receive messages
Text, images, files, rich messages, and media groups—one API for DMs and group chats.
SoChat Developer Platform
Bot APIs for developers: send messages with REST, receive updates via webhooks or long polling, and manage tokens, delivery, and debugging in one console.
import { StarIMBot } from '@starim-io/bot-sdk'
const bot = new StarIMBot(process.env.BOT_TOKEN!)
bot.on('message', async (ctx) => {
await ctx.reply(`Received: ${ctx.message.text}`)
})
await bot.setWebhook({
url: 'https://api.example.com/bot/webhook',
})
// Or bot.startPolling({ timeoutSec: 25 })Create a bot in the console and copy the token. Verify webhook signatures with the X-StarIM-Signature header (HMAC-SHA256).
Core capabilities
Clear responsibilities across docs, APIs, SDKs, and the console make integrations predictable.
Text, images, files, rich messages, and media groups—one API for DMs and group chats.
Push updates via setWebhook or pull via getUpdates. Updates are deduplicated by update_id with automatic retries.
Inline keyboards, command menus, inline mode, pin/kick actions, chatAction signals, and more.
Review requests, rotate tokens, configure webhooks, inspect delivery logs, and track 24h metrics to debug faster.
Quick start
From request to your first message—usually within minutes.
Sign in, submit a bot request, and fill in name, purpose, and description.
After approval, copy the one-time token (sbot_…) and store it securely.
Use setWebhook or startPolling, and set secret_token and allowed_updates.
Call sendMessage via REST/SDK and inspect delivery logs and API metrics.
Bot API
The gateway REST contract is the source of truth. Field names stay snake_case, while official SDKs map language idioms for you.
SendSend text, images, files, rich messages, and media groups.
EditEdit, delete, forward, or copy messages already sent by the bot.
UpdatesConfigure webhooks, pull updates, answer callbacks, and handle inline queries.
GroupsRead or update chat info, pin messages, remove members, and send chat actions.
ProfileManage getMe, command menus, descriptions, and friend request behavior.
FilesIssue two-step S3 upload credentials and query getFile metadata.
Updates delivery
Receive user messages, button callbacks, and member events with deduplication by update_id and automatic webhook retries.
Receive HTTPS POST callbacks, verify X-StarIM-Signature with HMAC, and optionally restrict by IP allowlists and secret_token.
Great for local or private-network development. The SDK ships startPolling, and you should choose either polling or webhooks.
Common update types
Filter subscriptions with allowed_updates , while Privacy Mode controls what the bot can read in group chats.
Official SDKs
Package authentication, webhook signature verification, and common API calls with end-to-end type safety.
Bot API and webhook handling with full TypeScript types, native fetch, and zero runtime dependencies.
pnpm add @starim-io/bot-sdkBuilt for JDK 17+ with HttpClient, optional jdk.httpserver integration, and Jackson serialization.
mvn: io.starim:bot-sdkUse cases
Business alerts, AI copilots, group operations, and workflow automation can all share the same Bot API.
Push orders, approvals, and monitoring alerts into direct messages or group chats.
Forward webhooks to your LLM stack, then support edits, recalls, and inline buttons.
Drive operational flows with command menus, chatAction hints, and member lifecycle events.
Connect REST and webhooks to enterprise systems, ticketing tools, and CRM platforms.
Submit a request in the console → configure a webhook or long polling → send your first message with the SDK. Inspect delivery logs when things go wrong.