Bots
Authentication
There are two credentials. They are not interchangeable.
Bot Token (runtime)
Prefix sbot_…:
Authorization: Bearer sbot_xxx
Used by runtime methods such as sendMessage, setWebhook, and getUpdates. Issued only after approval. Shown once in the console Overview, or rotated via Regenerate (old token dies immediately).
Account JWT (console)
Obtained by signing in with a SoChat account:
Authorization: Bearer <account JWT>
Used for /bots/applications and /bots/my/**. See parameter lists under Developer console APIs on the API index.
Base URL
Usually https://<your-api-host>/api/v1. Point the SDK baseUrl / apiBase there.
Keep tokens in server-side env vars (e.g.
SOCHAT_BOT_TOKEN). Never commit them.