Telegram#
Mode: long-poll (no public URL needed) Capabilities: text · card · buttons · update_message · typing · reply_to_message
1. Create a bot#
- In Telegram, message @BotFather.
- Send
/newbot, follow prompts, choose a name + username. - BotFather returns a bot token like
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11. - (Optional)
/setjoingroups Enableif you want the bot in groups.
2. Find a chat ID#
The simplest path:
- Add the bot to a group (or DM it directly).
- Send any message in the chat.
- Hit
https://api.telegram.org/bot<TOKEN>/getUpdatesin a browser. - The JSON response includes
chat.id(positive for DMs, negative for groups). Copy it.
3. Configure in opendray#
Channels → New channel → kind Telegram.
- Bot token: the BotFather token from step 1.
- Default chat ID: from step 2 (optional — used as the destination
for outbound notifications when no
ReplyCtxis set).
Save with Enabled = on. The channel card flips to running once the long-poll loop starts (a few seconds).
4. Test#
- The admin Test button sends
OpenDray channel test ✓to the default chat. - Send
/helpto the bot — opendray replies with the registered command list. - Trigger a session.idle event — you should see a card with Resume / End / Mute buttons.
Notes#
- Inline-keyboard
callback_datais capped at 64 bytes by Telegram. The Hub's command system uses payloads likecmd:/cancel <session-id>which fit comfortably. - Telegram has no built-in slash command registration —
/helpetc. work as plain text. To get autocomplete, run the BotFather/setcommandsflow with the same list opendray reports for/help.