Connect Telegram

TL;DR: Create a bot with @BotFather, run openclaw channels login telegram --token YOUR_TOKEN, and send /start to your bot.

Applies to: Windows, macOS, Linux
Audience: Power users, developers, security-conscious, enterprise
Last updated: 2026-02-23

power-user telegram channels cli

Table of contents

  1. Create a Telegram Bot
  2. Login Command
  3. Verify Connection
  4. Configure Allowlist
  5. Next Steps
  6. FAQ

Create a Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Follow prompts to name your bot and choose a username (must end in “bot”)
  4. Copy the bot token (looks like 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz)

Login Command

Run the login command with your token:

openclaw channels login telegram --token YOUR_TOKEN

Replace YOUR_TOKEN with the token from BotFather.

Verify Connection

Send /start to your bot in Telegram. You should receive a welcome message.

Configure Allowlist

By default, anyone can message your bot. To restrict access, edit ~/.openclaw/openclaw.json:

{
  "channels": {
    "telegram": {
      "allowFrom": ["@yourusername", "123456789"]
    }
  }
}

Use usernames or numeric user IDs. Use "*" to allow anyone.

Next Steps

FAQ

Q: Can I use the same bot in multiple groups?
A: Yes. Add the bot to groups and configure channels.telegram.groups.

Q: How do I get my user ID?
A: Send /start to any bot (e.g., @userinfobot) to see your ID.

Q: What if I lose the token?
A: Revoke the old token in BotFather and create a new one.

Q: Can I disable inline mode?
A: Yes. Set channels.telegram.inlineMode: false.

Q: How do I disconnect?
A: Run openclaw channels logout telegram.

Recommended next

Connect Slack