OpenClaw Telegram Bot Setup Guide

Telegram is the fastest way to start chatting with OpenClaw, and the channel the official docs recommend first. You create a bot with @BotFather, give OpenClaw the token and approve yourself. It takes about 10 minutes and needs no plugin and no open ports.

Quick answer

Send /newbot to @BotFather, copy the token, run openclaw channels add --channel telegram --token <bot-token>, message your bot, then approve yourself with openclaw pairing approve telegram <CODE>.

Why start here

Why Telegram is the easiest OpenClaw channel

Bundled

Telegram support ships with OpenClaw, so there's no plugin to install.

Just a token

One bot token from @BotFather. No phone number, QR code or business account.

No open ports

OpenClaw uses long polling by default, so it works on a laptop or behind a firewall.

Rich features

Buttons, live-updating replies, voice notes, topics and a Control UI mini app.

You need OpenClaw installed with an AI model connected. New? Start with the install guide.

1
Step 1

Create a bot with @BotFather

  1. Open Telegram and search for @BotFather. Check it has the blue verification tick. You can also use BotFather's web app at t.me/BotFather?startapp.
  2. Send /newbot.
  3. Choose a display name, for example "My OpenClaw".
  4. Choose a username that ends in bot, for example my_openclaw_bot.
  5. Copy the token BotFather sends. It looks like 123456789:AAH….
Keep the token secret

Anyone with your bot token can control the bot. Never post it publicly. If it leaks, send /revoke to @BotFather to get a new one, then update OpenClaw.

2
Step 2

Give OpenClaw the bot token

Terminal
openclaw channels add --channel telegram --token <bot-token>
3
Step 3

Check that Telegram is ready

Terminal
openclaw channels status --probe

This confirms the token works and OpenClaw can reach Telegram.

4
Step 4

Message your bot and approve yourself

Open your bot in Telegram (search for its username), tap Start and send a message. Because the default policy is pairing, the bot replies with a pairing code and your Telegram user ID. Note the ID, because you'll need it in step 5.

Example reply. The exact wording may differ.

Hi!
You're not paired yet. Pairing code: K7Q2-9M
Your Telegram user id: 482913775

Approve it on the computer running OpenClaw:

Terminal
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>

Send another message. Your assistant now answers.

5
Step 5

Lock down who can use the bot

Telegram bots are public. Anyone can find yours by username. Choose a direct-message policy:

dmPolicyWhat it doesUse when
pairing defaultUnknown users get a code and wait for your approvalYou'll add people over time
allowlistOnly user IDs in allowFrom can chat. Everyone else is ignored.A private, personal bot (most secure)
openAnyone who finds the bot can use itPublic bots with tightly restricted tools only
disabledBlocks all direct messagesGroup-only bots
Use your numeric user ID

allowFrom needs your numeric Telegram user ID, such as 482913775. A phone number, @username, group ID or the bot's own ID won't work. The pairing reply in step 4 shows your ID.

Make it yours

Telegram config builder

Enter your numeric user IDs and, optionally, group chat IDs. Copy the result into ~/.openclaw/openclaw.json.

~/.openclaw/openclaw.json (JSON5)
Groups

Add your OpenClaw bot to Telegram groups

  1. Add the bot to the group from the group's member list.
  2. Find the group chat ID. Supergroups use negative IDs that start with -100. It appears in OpenClaw's logs when the group sends a message.
  3. Allow the group under channels.telegram.groups with groupPolicy: "allowlist". Use the builder above.
  4. Decide what it can see. By default, Telegram's privacy mode only shows bots messages that mention them or are commands. To let it see all messages, send /setprivacy to @BotFather and disable it, or make the bot a group admin.

Keep requireMention: true so the bot only replies when someone types its @username, not to every message.

What you get

OpenClaw features on Telegram

Inline buttons

Tap to approve actions or pick options, with no typing.

Live replies

Answers stream in by editing the message as it's written.

Control UI mini app

Send /dashboard to open the Control UI inside Telegram.

Forum topics

Each topic in a forum group gets its own session.

Voice and video notes

Send voice notes, video notes and photo albums.

Location and reactions

Share places and venues. OpenClaw sees your reactions.

Long polling is the default. For high-traffic bots on a public server, OpenClaw also supports webhook mode with webhookUrl and webhookSecret.

Docker and servers

Telegram on Docker or a VPS

Telegram is the ideal VPS channel because OpenClaw connects out to Telegram, so you don't need to open any inbound ports. With Docker:

Terminal
docker compose run --rm openclaw-cli channels add --channel telegram --token "<bot-token>"

See the Docker guide and VPS guide.

Troubleshooting

Fix common Telegram bot problems

Bot doesn't reply

Run openclaw channels status --probe, then check openclaw pairing list telegram for a waiting request.

Ignored after switching to allowlist

Make sure allowFrom has your numeric user ID, not your @username or phone number.

Conflict: terminated by other getUpdates

Two programs are using the same bot token. Run only one OpenClaw gateway per bot, or create a second bot.

Silent in groups

Check the group is in channels.telegram.groups, mention the bot, and review privacy mode with /setprivacy.

Unauthorized / invalid token

The token was mistyped or revoked. Get a fresh one from @BotFather and add it again.

Stops when the laptop sleeps

Replies need the gateway running. Use an always-on machine or a VPS.

More fixes: troubleshooting guide.

FAQ

OpenClaw Telegram questions

How do I connect OpenClaw to Telegram?

Create a bot with @BotFather using /newbot, then run openclaw channels add --channel telegram --token followed by your token. Message your bot and approve yourself with openclaw pairing approve telegram and the code it sends.

Is Telegram free to use with OpenClaw?

Yes. Telegram bots are free, and Telegram support is bundled with OpenClaw. You only pay for the AI model you connect.

How do I find my Telegram user ID for OpenClaw?

Message your bot while dmPolicy is pairing. The pairing reply shows "Your Telegram user id". Use that numeric ID in allowFrom, not your username or phone number.

Do I need to open ports for Telegram?

No. OpenClaw uses long polling by default, so it connects out to Telegram and works behind firewalls and on servers with no open ports. Webhook mode is optional.

How do I stop strangers using my OpenClaw bot?

Keep dmPolicy on pairing, or switch to allowlist and put only your numeric user IDs in allowFrom. Avoid the open policy unless the bot's tools are tightly restricted.

Can my OpenClaw bot work in Telegram groups?

Yes. Add it to the group, allow the group's chat ID under channels.telegram.groups and keep requireMention on. To let it see every message, disable privacy mode with /setprivacy or make it an admin.

Keep going