โœˆ๏ธ Telegram Bot Setup

The easiest channel to get started with OpenClaw

Why Telegram?

Telegram is the easiest channel to set up with OpenClaw. It takes about 2 minutes, requires no special hardware or phone number verification, and works great on mobile. Most users start here.

1

Create a Bot with BotFather

Open Telegram and search for @BotFather, then:

  1. Start a chat with @BotFather
  2. Send /newbot
  3. Enter a name for your bot (e.g., "My OpenClaw")
  4. Enter a username ending in "bot" (e.g., "myopenclaw_bot")
  5. BotFather gives you a token โ€” save this!
/newbot
BotFather
Alright, a new bot. How are we going to call it? Please choose a name for your bot.
My OpenClaw Assistant
BotFather
Good. Now let's choose a username for your bot. It must end in 'bot'.
myopenclaw_bot
BotFather
Done! Your new bot is created.

Use this token to access the HTTP API:
7123456789:AAHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2

Get Your Telegram User ID

You need your numeric user ID to whitelist yourself. Search for @userinfobot on Telegram and send it any message:

hi
userinfobot
Your user ID: 123456789
Your username: @yourusername

Save this ID โ€” you'll use it to configure allowed users.

3

Configure OpenClaw

Add the Telegram channel to your OpenClaw config:

# If using the onboard wizard, it will ask for these
# Or add manually to ~/.openclaw/config.yaml:

channels:
  telegram:
    token: "7123456789:AAHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    allowedUsers:
      - "123456789"  # Your Telegram user ID

Or configure via CLI:

openclaw channels add telegram \
  --token "7123456789:AAHxxxxxxx" \
  --allowed-users "123456789"
4

Start OpenClaw

# Start the gateway
openclaw gateway

# Or if running as daemon
openclaw gateway start
5

Message Your Bot!

Find your bot on Telegram (search for @yourbotusername) and send it a message:

Hello! What can you do?
My OpenClaw Assistant
Hey! I'm your personal AI assistant running on OpenClaw. I can help with all sorts of things โ€” answer questions, search the web, manage files, control smart home devices, send reminders, and much more. What would you like to do? ๐Ÿฆž

๐ŸŽ‰ That's It!

Your Telegram bot is now connected to OpenClaw. Every message you send goes to your local AI assistant.

Optional Customizations

Set a Profile Photo

Make your bot look nicer in Telegram:

  1. Open @BotFather
  2. Send /setuserpic
  3. Select your bot
  4. Send an image (square works best)

Set a Description

Add a description that shows when users first open your bot:

  1. Open @BotFather
  2. Send /setdescription
  3. Select your bot
  4. Enter a description

Allow Multiple Users

Add family members or friends to the allowed list:

channels:
  telegram:
    token: "your-token"
    allowedUsers:
      - "123456789"  # You
      - "987654321"  # Family member
      - "555555555"  # Friend

Add to a Group Chat

You can add your bot to a Telegram group:

  1. First, enable group mode with @BotFather: /setjoingroups โ†’ Enable
  2. Add your bot to the group
  3. By default, bots only see messages starting with / or @mentions
  4. To see all messages: /setprivacy โ†’ Disable

โš ๏ธ Group Chat Security

In group chats, be careful what tools you enable. Consider using sandbox mode to limit what OpenClaw can do when triggered by group messages.

Troubleshooting

Bot doesn't respond?

# Check if OpenClaw is running
openclaw status

# Check logs for errors
openclaw logs -f

# Verify token is correct
curl "https://api.telegram.org/botYOUR_TOKEN/getMe"
# Should return your bot's info

Bot responds to others but not you?

Your user ID might not be in the allowedUsers list. Double-check the ID with @userinfobot and update your config.

"Unauthorized" error?

Your bot token is invalid or has been revoked. Get a new token from @BotFather using /revoke then /token.

Related Guides

Next up: Discord bot

Bring OpenClaw into your servers and channels.

Continue to Discord โ†’ Join Discord

Stay in the loop

The 5-minute weekly read that makes your OpenClaw smarter.