Telegram Bot Setup
Step-by-step guide to connect your Claw Buff agent to Telegram
Connect your Claw Buff AI agent to Telegram so users can chat with it via DM or in group chats. Setup takes about 5 minutes.
Prerequisites
- A Telegram account
- A deployed Claw Buff agent (Getting Started)
Step 1: Create a Bot with BotFather
Open BotFather
Open Telegram and search for @BotFather (look for the verified blue checkmark). This is Telegram's official bot for creating and managing bots.
Create your bot
Send /newbot to BotFather and follow the prompts:
- Bot name — A display name for your bot (e.g., "My AI Assistant")
- Bot username — Must end in
bot(e.g.,my_claw_bot)
Save your Bot Token
BotFather will reply with a Bot Token that looks like:
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
Copy this token — you'll need it in the next step.
Keep your Bot Token secret. Anyone with the token can control your bot. Never share it in public chats or commit it to Git.
Step 2: Connect to Claw Buff
- Open the Claw Buff Console → Channels page
- Find the Telegram card and click Connect
- Paste your Bot Token from Step 1
- Click Save & Activate
Your agent will connect to Telegram within seconds. You'll see the status change to Connected.
Step 3: Authorize Access
By default, your bot uses pairing mode — new users must be approved before they can chat. When someone messages your bot for the first time, they'll see:
OpenClaw: access not configured.
Your Telegram user id: 1234567890
Pairing code: ABCD1234
Ask the bot owner to approve with:
openclaw pairing approve telegram ABCD1234
Approve via Pending Requests
Go to your Claw Buff Console → Channels page. When someone requests access, a Pending Pairing Requests section appears automatically with the pending code. Click Approve next to the request.
Pairing codes expire after 1 hour. If expired, the user just needs to message the bot again to get a new code.
Manage Authorized Users
You can also manage access directly. Click Manage on the Telegram channel card to:
- View all currently authorized users
- Add a user by entering their Telegram user ID (proactive authorization)
- Remove a user to revoke their access
Step 4: Start Chatting
Open Telegram, find your bot by its username, and send a message. Your AI agent will respond!
Group Chat Setup
To use your bot in Telegram groups:
- Add your bot to the group
- The bot will respond when @mentioned by default
In groups, the bot only responds when mentioned (e.g., @my_claw_bot what's the weather?). This prevents the bot from responding to every message in busy groups.
Features
| Feature | Supported |
|---|---|
| Direct Messages | Yes |
| Group Chats | Yes (mention required) |
| Streaming Responses | Yes (real-time typing) |
| Rich Formatting | Yes (HTML/Markdown) |
| Forum Topics | Yes |
| File Attachments | Yes |
Frequently Asked Questions
1. Bot not responding?
- Check the token — Make sure you pasted the complete token with no extra spaces
- Check the Console — The Channels page shows connection status and error logs
- Network issues — Your agent needs outbound access to
api.telegram.orgon port 443
2. Bot responds slowly?
Streaming is enabled by default. The bot edits its message in real-time as the AI generates a response. If you see delays, check your model configuration in Console → Agent → Model.
3. "Forbidden: bot was blocked by the user"?
The user has blocked your bot on Telegram. They need to unblock it and send /start again.