Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer cst_your_api_key_hereGetting Your Key
- Open the Telegram Bot
- Tap
/start - Tap Profile — your API key is shown there
- Tap the key to copy it
Key Format
API keys start with cst_ followed by a random string:
cst_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2Regenerating Your Key
In the bot Profile screen, tap Regenerate Key. The old key stops working immediately. Cooldown: 10 minutes.
Errors
| Status | Response | Meaning |
|---|---|---|
| 401 | {"ok": false, "error": "Authorization required"} | No Bearer token |
| 401 | {"ok": false, "error": "Invalid API key"} | Wrong key |
| 403 | {"ok": false, "error": "Account suspended"} | Banned |
