At a glance
| Field | Value |
|---|---|
| Platform slug | telegram |
| Auth type | Static bot token (from @BotFather) |
| API | Telegram Bot API |
| Best for | A unified inbox for your Telegram bot’s direct messages. |
Capabilities
| Feature | Supported | Notes |
|---|---|---|
| DMs | Yes | Read direct messages your bot receives and reply to them |
| Send DM | Yes | Send text, a photo (by URL), or a document (by URL) |
| Comments | No | Telegram bots have no post-comment model |
| Reviews | No | Not applicable |
| Mentions | No | Not tracked for Telegram |
| Publishing | No | Telegram is a messaging connector here; it does not publish posts |
| Webhooks | Yes | Inbound messages arrive in real time via Telegram webhooks |
Connecting
Telegram does not use OAuth. There is no authorization URL, nocode exchange, no refresh token, and no token expiry. You create a bot with @BotFather, copy its token, and pass it in metadata.bot_token:
Getting a bot token
- Open Telegram and message @BotFather.
- Send
/newbotand follow the prompts (choose a name and a username ending inbot). - BotFather replies with a token of the form
<bot_id>:<secret>. - Paste that token as
metadata.bot_token.
Reading and sending DMs
Telegram has no message-history API: a bot only sees messages that arrive after it is connected. SocialAPI builds the inbox from inbound webhook events from connect time onward.List DM conversations
Send a DM
Limitations and gotchas
- The bot cannot start a conversation. Telegram forbids a bot from messaging a user who has never messaged it. Sending to such a user returns
telegram.cannot_message(HTTP 403). The user must send/startor any message to the bot first. There is no 24-hour window once started. - No message history backfill. There is no list or history endpoint in the Bot API. The inbox is populated only by webhooks received after you connect.
- DM-only. Posts, channels, and comments are not supported through this connector.
- No token expiry. A bot token never expires. It is revoked only via @BotFather (
/revoke). If a token is revoked, reconnect with a fresh token.
Errors
| HTTP | Code | When it occurs |
|---|---|---|
| 403 | telegram.cannot_message | The bot cannot message this chat: the user has not started the bot, or blocked or removed it |