Connect OpenClaw to Telegram
Create a Telegram bot, configure pairing and mention policy, start the Gateway, and verify channel transport.
Telegram connects through the OpenClaw Gateway. Configure a bot token, use pairing for direct messages, and keep group replies mention-gated until you have tested the policy.
Create the bot
In Telegram, open the verified @BotFather account, run /newbot, and save the token. Treat the token like a password. Do not paste it into public checkers, screenshots, or issue reports.
Configure the channel
The core settings enable Telegram, provide the bot token, use DM pairing, and require a mention in groups. The official documentation also supports a token file and an environment fallback for the default account.
Telegram does not use a channel-login command for this setup; configure the token and start the Gateway.
Start and pair
Send the bot a direct message, then inspect pending requests and approve the code shown by your trusted account:
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
Pairing codes expire, so approve the current request instead of reusing an old screenshot.
Test the message policy
Use four controlled messages:
- An approved direct message should receive a reply.
- An unapproved direct message should enter pairing or be rejected according to policy.
- A group message with the required mention should reach the agent.
- A group message without the mention should remain ignored when mention gating is enabled.
This proves both the allowed path and the negative policy. Testing only the owner DM does not show that a public group is safe.
Verify transport
openclaw gateway status
openclaw channels status --probe
openclaw logs --follow
Expected result
The Gateway is reachable, Telegram reports a working transport or successful audit, and a DM from the approved account receives a reply.
For groups, Telegram Privacy Mode affects which messages the bot receives. If you disable mention requirements, configure group visibility intentionally and re-add the bot after changing Privacy Mode.
Source notes
Technical facts on this page were checked against primary sources.