Developer docsCRM Gateway API reference Postman العربية

Telegram

A Telegram bot is an account just like a Page. Everyone who starts a chat with it becomes a conversation in the same API, events and inbox. It's private chats only, so group and channel messages are not received.

Connecting

Create the bot with @BotFather, then paste its token in Connections → Connect a Telegram bot. When the platform runs on a public HTTPS address it sets up a webhook with a secret of its own for each bot. On a development machine it fetches messages every so often instead.

How it differs from Messenger and WhatsApp

Sending and files

POST /api/v1/conversations/{id}/messages   { "text": "..." }
POST /api/v1/conversations/{id}/messages   { "image": { "source": "url", "url": "https://..." } }
GET  /api/v1/messages/{messageId}/attachments/{index}

Incoming pictures and files come with a platformMediaId and are downloaded from the attachments link above (up to 20 MB, Telegram's limit for bots).