Telegram
Connect your OpenClaw agent to Telegram so users can chat with it directly in the Telegram app. You will need a bot token from Telegram's BotFather.
Prerequisites
- A Telegram account
- Access to your OpenClaw Dashboard
Step-by-Step Setup
1. Open BotFather
Open Telegram and search for @BotFather. Make sure you select the one with the verified blue checkmark -- this is Telegram's official bot for creating and managing bots.
2. Create a New Bot
Send the following command to BotFather:
/newbot
BotFather will ask you two things:
- Display name -- This is the name users see in the chat header (e.g., "My AI Assistant"). It can contain spaces and does not need to be unique.
- Username -- This is the unique handle for your bot. It must end in
bot(e.g.,my_ai_assistant_bot).
3. Copy the Token
After you pick a username, BotFather replies with a message containing your bot token. It looks something like this:
7123456789:AAH1bGciOiJIUzI1NiIsInR5cCI6Ikp
Copy the entire token. You will paste it into the OpenClaw Dashboard in the next step.
Keep your bot token secret. Anyone with the token can control your bot. If you suspect it has been leaked, send /revoke to BotFather to generate a new one.
4. Connect in OpenClaw
- Go to your OpenClaw Dashboard.
- Navigate to Instance > Channels.
- Click Telegram.
- Click Connect.
- Paste the bot token you copied from BotFather.
- Click Save.
OpenClaw will verify the token and connect to Telegram. You should see the channel status change to Connected within a few seconds.
5. Test It
Open Telegram and search for the bot username you chose in step 2. Send it a message. Your OpenClaw agent should respond.
If you already have a Telegram bot and need to retrieve the token, send /token to @BotFather, then select your bot from the list.
Troubleshooting
- Bot does not respond: Check that the channel shows as "Connected" in your dashboard. Make sure your AI provider (Claude, GPT, etc.) is configured and has valid API credits.
- "Token is invalid" error: Double-check that you copied the entire token, including the numbers before the colon.
- Wrong bot: Make sure you are messaging the correct bot username, not BotFather itself.