Telegram Integration

Connect Moltbot or Clawdbot to Telegram using a BotFather token and a pairing code.

1) Create a bot with BotFather

  1. Open Telegram and search for @BotFather.
  2. Send /newbot and follow the prompts.
  3. Copy the API token it gives you.

2) Add the token to your environment

Set the token on your server:

export TELEGRAM_BOT_TOKEN="YOUR_TOKEN"

3) Pair and approve

After starting the agent, it will send a pairing code. Approve it in the server terminal:

moltbot pairing approve telegram <code>

Important: run this in the server terminal, not inside Telegram chat.

Webhook vs Polling

If you run on a VPS with a public URL, use webhook mode for better reliability. If you run locally, polling is easier.