← All articles

OpenClaw Telegram Setup: BotFather, Pairing, and First Reply

Create the bot, add the token, approve the first DM, and verify the sender and chat IDs from logs before you move into groups.

A lot of Telegram issues happen because pairing, privacy mode, and group policy get mixed together. Keep the first DM flow clean, verify it, then extend the config to groups.

Quick answer

Create the bot token, add the Telegram channel, approve the DM pairing code, and confirm the IDs in logs before you set group policies.

Command line steps

1. Create the bot and add the token to OpenClaw

Use BotFather for the token and then attach it from the CLI.

openclaw channels add --channel telegram --token "$TELEGRAM_BOT_TOKEN"

2. Approve the first DM pairing request

Telegram DMs default to pairing, so you need to approve the first sender unless you choose an allowlist policy instead.

openclaw pairing list telegram
openclaw pairing approve telegram <CODE>

3. Read IDs from logs before group setup

Logs give you the exact from.id and chat.id values you need for allowlists.

openclaw logs --follow
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates"

What to check if it still fails

  • If group messages do not arrive, disable Telegram privacy mode or make the bot an admin and re-add it to the group.
  • If DMs pair correctly but groups still fail, configure channels.telegram.groups and the sender allowlist separately.
  • If you upgraded from an older setup, openclaw doctor --fix can normalize old Telegram allowlist shapes.
FAQ

Frequently asked questions

What will I learn from OpenClaw Telegram Setup: BotFather, Pairing, and First Reply?

Create the bot, add the token, approve the first DM, and verify the sender and chat IDs from logs before you move into groups. The guidance is written for practical self-hosted OpenClaw environments, but commands and configuration can change between releases.

Should I back up OpenClaw before changing the configuration?

Yes. Back up the active configuration, credentials references, channel settings, and service definitions before repairs, upgrades, or model changes, then validate the gateway and important workflows after the change.

Can Milan help with OpenClaw setup or troubleshooting?

Yes. Milan provides OpenClaw setup, model and channel configuration, secure remote access, workflow automation, troubleshooting, and deployment support.

Need help with OpenClaw setup?

Turn the idea into a working system.