Connect OpenClaw to Telegram: Complete Setup

SetupTelegram

Connect OpenClaw to Telegram: Complete Setup

Connect OpenClaw to Telegram in minutes. Create a bot, configure access, and start chatting.

6 min readLast updated Feb 18, 2026
Stuck?Check the troubleshooting index or ask in Discord.

Overview

Telegram is the quickest way to start using OpenClaw. In this guide, we'll create a Telegram bot, connect it to OpenClaw, and get you chatting with your AI assistant in minutes.

What you'll need
  • A Telegram account
  • OpenClaw installed (see Getting Started)
  • Your bot token (we'll get this in step 1)

Create Your Telegram Bot

Telegram bots are created through BotFather, an official Telegram bot. Here's how:

1

Open Telegram

Launch the Telegram app on your phone or desktop and search for @BotFather.

Verify it's the real BotFather
Make sure the username is exactly @BotFather (blue checkmark). There are fake bots with similar names.
2

Start the bot

Click Start or send /start to begin.

3

Create new bot

Send /newbot to create a new bot.

4

Name your bot

BotFather will ask for a name. This is the display name (e.g., "My OpenClaw Assistant").

5

Choose a username

Choose a unique username ending in bot (e.g., my_assistant_bot). This is how people will find and mention your bot.

Get Your Bot Token

After creating your bot, BotFather will show you a token that looks like this:

text
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
Keep your token safe
This token is like a password. Don't share it publicly. If you lose it, you can get a new one with /token in BotFather.

Configure OpenClaw

Now let's tell OpenClaw about your Telegram bot. You can do this through the config file or environment variables.

Open your config.yaml (or create it from config.example.yaml) and add:

config.yaml
channels:
  telegram:
    enabled: true
    botToken: "YOUR_BOT_TOKEN_HERE"

Start the Gateway

Start OpenClaw and let it connect to Telegram:

terminal
openclaw gateway

You should see logs indicating Telegram is connecting. Once connected, it's time to authorize yourself.

Pair Your Account

By default, Telegram DMs require pairing (authorization). Here's how to approve yourself:

1

Find your pairing code

Run this command in your terminal:

bash
openclaw pairing list telegram

You'll see a code like ABC123.

2

Message your bot

Go to your bot in Telegram and send the code:

text
ABC123
3

Approve the pairing

Back in your terminal:

bash
openclaw pairing approve telegram ABC123
Pairing expires after 1 hour
If you don't complete pairing within an hour, you'll need to repeat the process.

Test It

Now let's verify everything works:

1

Send a message

Go to your bot on Telegram and send a message like "Hello!"

2

Wait for a response

Your AI assistant should respond. If it doesn't, check the troubleshooting section below.

You're set up!
Your Telegram bot is now connected to OpenClaw. You can now chat with your AI assistant from your phone or desktop.

Troubleshooting

Common issues and how to fix them:

Bot doesn't respond to messages

  • Make sure you've completed the pairing process above
  • Check that Telegram is enabled: openclaw channels status
  • Check logs: openclaw logs --follow

"setMyCommands failed" error

This usually means Telegram's API is blocked. Make sure your server can reach api.telegram.org.

Finding your Telegram user ID

Some configs require your numeric user ID. The easiest way:

  • DM your bot
  • Run openclaw logs --follow
  • Look for from.id in the logs