Telegram Guide

OpenClaw Telegram setup

This page covers connecting OpenClaw to Telegram: create a bot via BotFather, get your user ID, configure the channel, and verify messages work.

For full setup flow, start at OpenClaw setup. If Telegram auth fails, see troubleshooting.

Quick answer

Create a bot via @BotFather, get your Telegram user ID, run openclaw configure to add the Telegram channel, then start chatting.

Prerequisites

  • OpenClaw installed via installer or npm.
  • Telegram account (for creating bot and getting user ID).
  • LLM provider credentials already configured.
  • Gateway running: openclaw gateway status.

Step 1: Create your Telegram bot

1. Open Telegram and search for @BotFather.

2. Send /newbot to create a new bot.

3. Follow the prompts to name your bot (e.g., "My OpenClaw Assistant").

4. Copy the bot token — you'll need it for configuration.

Example token: 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz

Step 2: Get your Telegram user ID

1. Search for @userinfobot on Telegram.

2. Send any message to get your user ID.

Alternatively, use @myidbot — send /getid to get your ID.

Example user ID: 123456789

Step 3: Configure Telegram channel in OpenClaw

Run the configuration wizard:

openclaw configure

Select "Add channel" → "Telegram" and enter:

  • Bot token from Step 1.
  • Your user ID from Step 2 (for allowlist).

Or add manually via config:

openclaw config set telegram.bot_token "YOUR_BOT_TOKEN"
openclaw config set telegram.allowed_users "YOUR_USER_ID"

Step 4: Verify Telegram connection

Check gateway status:

openclaw gateway status

You should see Telegram as an active channel.

Open your bot in Telegram and send /start — you should receive a greeting from OpenClaw.

Step 5: Test your setup

Send a message to your bot:

"Hello, can you help me with coding?"

OpenClaw should respond using your configured LLM provider.

Common errors and quick fixes

"Bot token invalid"

Copy the token exactly as provided by BotFather — it should be in the format 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz.

"User not authorized"

Your user ID must be in the allowlist:

openclaw config set telegram.allowed_users "YOUR_USER_ID"
openclaw gateway restart

Bot doesn't respond

Verify the gateway sees Telegram:

openclaw gateway status

Check logs:

openclaw doctor

"Channel not found" during config

Ensure OpenClaw is updated:

npm install -g openclaw@latest
Cookie preferences