Docs / Telegram Account API
Telegram Account API
Use connected Telegram user accounts (GramJS / MTProto) through NabatDesk. Session strings, phone codes, and 2FA passwords are never exposed to API customers.
Requires paid plan entitlement
telegram_account_api and scope telegram:account:read / telegram:account:write (or telegram:read / messaging scopes).List & inspect accounts
- GET /telegram/accounts
- GET /telegram/accounts/:accountId
- GET /telegram-accounts (legacy CRM list)
- GET /telegram-accounts/:id/status
Safe fields only: connection id, Telegram user id, username, names, status. Phone and session material are omitted.
Send private messages
Contact-centric — the contact must be linked to the account (usually after private-dialog sync).
- POST /telegram/accounts/:accountId/messages
- POST /contacts/:contactId/messages
- POST /contacts/:contactId/messages/media
curl -sS -X POST "/api/v1/telegram/accounts/ACCOUNT_UUID/messages" \
-H "Authorization: Bearer YOUR_NABATDESK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contactId":"CONTACT_UUID","text":"Hello via account"}'Dialogs
NOT CURRENTLY SUPPORTED. GET /telegram/accounts/:id/dialogs returns 501 NOT_SUPPORTED. The runtime syncs private CRM contacts; it does not expose a full dialogs/groups/channels API yet.
Response shape
{
"success": true,
"data": { ... },
"meta": { "request_id": "…", "provider": "telegram-account" }
}Not currently supported
- Phone / QR login via Developer API (dashboard only)
- Full dialogs, groups, channels, member admin ops
- Raw GramJS / MTProto method exposure
- Session download or export
Events
Use Core outbound webhooks with Telegram Account source (MESSAGE_INBOUND, MESSAGE_OUTBOUND, CONTACT_CREATED, etc.).