Telegram Bot Setup
Connect your OpenClaw agent to Telegram using grammY.
5 min read
Updated Feb 2026
Overview
Telegram is the easiest channel to set up — just a bot token. OpenClaw uses the grammY library for the Telegram Bot API. It supports DMs, groups, media, and reactions.
Step 1: Create a Telegram Bot
- Open Telegram and search for
@BotFather - Send
/newbotand follow the prompts - Choose a name and username for your bot
- Copy the bot token (looks like
123456:ABC-DEF...)
Step 2: Configure OpenClaw
Add the bot token to your OpenClaw config:
openclaw.json
{
"channels": {
"telegram": {
"botToken": "YOUR_BOT_TOKEN_HERE"
}
}
}Or use the onboarding wizard: openclaw onboard and select Telegram when prompted.
Step 3: Restart the Gateway
openclaw gateway restart
The Gateway will connect to Telegram automatically. Send a message to your bot to test.
Group Chat Setup
To use your bot in Telegram groups:
- Add the bot to your group
- The bot responds when mentioned by default
- Configure mention patterns in openclaw.json:
openclaw.json
{
"messages": {
"groupChat": {
"mentionPatterns": ["@your_bot_username"]
}
}
}Security
By default, DM pairing is enabled — unknown senders receive a pairing code. Approve with openclaw pairing approve. For public bots, set dmPolicy to "open".