Skip to content

Telegram

Relay supports two Telegram identities, and they are different:

Identity How it connects What it can do
Bot Bot API token, configured from the Telegram page in the dashboard Send messages, polls, and interactive messages to chats the bot knows
Personal account MTProto, with your own API credentials from https://my.telegram.org/apps (TELEGRAM_API_ID / TELEGRAM_API_HASH) Send as your own account, with genuine online / last-seen presence

The bot token is stored encrypted (AES-256-GCM) and is never returned by an endpoint — only a masked hint is shown.

Configure the bot token from the Telegram page. A bot cannot list its own chats — the Bot API has no such method. Chats are discovered from getUpdates (a durable worker sync) or added manually by id or @username.

Connect a real Telegram user account with the API credentials from https://my.telegram.org/apps. This is the only path that shows genuine presence (online / last-seen), because the Bot API withholds presence from bots deliberately.

Telegram runs on its own BullMQ queue and worker, separate from the WhatsApp messages queue. The WhatsApp queue is throttled for ban-safety and stalls whenever the Baileys socket is down; Telegram has neither constraint, so sharing the queue would make Telegram sends wait on an offline WhatsApp session.

  • A poll becomes sendPoll.
  • Link and copy buttons become an inline keyboard.
  • Quick replies and list rows become a reply keyboard (not callback buttons — the app has no inbound receiver to answer a callback_query, so a callback button would leave the recipient watching a spinner forever).
  • Only the bot can send these — MTProto has no equivalent.