Telegram

Telegram is the most popular channel for personal use with OpenClaw. This guide covers bot creation, configuration, and advanced features.

Create a Telegram Bot

  1. Open Telegram and message @BotFather
  2. Send /newbot and follow the prompts
  3. Copy the HTTP API token provided

Get Your User ID

Message @userinfobot on Telegram to get your numeric user ID.

Configuration

channels:
  telegram:
    enabled: true
    bot_token: "${TELEGRAM_BOT_TOKEN}"
    allowed_users:
      - 123456789  # Your Telegram user ID
    webhook_url: "https://your-domain.com/webhook/telegram"

Webhook vs Polling

Requires a public HTTPS endpoint:

channels:
  telegram:
    mode: "webhook"
    webhook_url: "https://your-domain.com/webhook/telegram"

Polling Mode (Development)

No public URL required:

channels:
  telegram:
    mode: "polling"
    poll_interval: 1000  # milliseconds

Access Control

Restrict bot access to specific users or groups:

channels:
  telegram:
    allowed_users:
      - 123456789
      - 987654321
    allowed_groups:
      - -1001234567890
    admin_users:
      - 123456789

Message Features

OpenClaw supports these Telegram-specific features:

  • Markdown and HTML formatting in responses
  • File uploads and downloads
  • Inline keyboards and callback queries
  • Photo, document, and voice message handling
  • Reply threading in groups

First Interaction

After configuration, open Telegram and message your bot. Send /start to verify it responds correctly.