Skip to main content
OpenClaw supports Telegram as a chat channel. In E2B you can run OpenClaw in a sandbox, attach your bot token, and approve user pairing from the terminal. This guide covers the working flow we used:
  1. Start OpenClaw in a sandbox.
  2. Enable the Telegram plugin.
  3. Add Telegram channel credentials.
  4. Start the channel runtime in background.
  5. Approve Telegram pairing.

Prerequisites

  • A Telegram bot token from @BotFather. There’s instructions to follow there, it runs /newbot for you and walks you through naming and creating your bot.
  • An OpenAI API key for the OpenClaw model.
  • E2B API key configured locally.

Quick start

For Telegram setup, you do not need to open the gateway URL in a browser. The gateway process is used here as a long-running channel runtime.

Pair your Telegram user

  1. Open your bot in Telegram and send a message (for example: hi).
  2. Telegram will return a pairing prompt similar to:
  1. Approve that pairing code via sandbox.commands.run(...):
openclaw pairing approve telegram <PAIRING_CODE> also works if you prefer that form.

Verify channel status

If you need logs from channel handlers:

Troubleshooting

  • Unknown channel: telegram
    • The Telegram plugin is not enabled. Run openclaw config set plugins.entries.telegram.enabled true before adding the channel.
  • OpenClaw: access not configured
    • Pairing has not been approved yet. Run openclaw pairing approve ....
  • No API key found for provider ...
    • This guide uses openai/gpt-5.2. Set OPENAI_API_KEY in sandbox envs.
  • No pending pairing requests from pairing list
    • Send a fresh message to the bot first, then retry pairing list --channel telegram.

OpenClaw gateway

Run OpenClaw’s web gateway with token auth