GuidesChannels

Connecting OpenClaw to Telegram, step by step

Telegram is the easiest first channel for OpenClaw: a bot token from BotFather, one config block, no exposed ports. The full setup, including pairing.

July 17, 2026The Everpod team
The short answer

Create a bot with Telegram’s BotFather, put its token in OpenClaw’s config, restart the Gateway, and approve yourself via a pairing code. Telegram uses long polling by default, so nothing on your machine gets exposed to the internet — which is why it’s the classic first channel for a new OpenClaw agent.

Step 1: get a bot token from BotFather

Your agent appears in Telegram as a bot, and Telegram bots are minted by the official @BotFather account: message it, send /newbot, follow the two prompts (display name, then a unique username ending in bot), and copy the token it hands back. That token is the bot’s identity — treat it like a password: anyone holding it can impersonate your agent’s Telegram presence.

Step 2: give the token to OpenClaw

Telegram is deliberately simple in OpenClaw — no login command, just configuration. The minimal config block:

{
  channels: {
    telegram: {
      enabled: true,
      botToken: "123:abc",
      dmPolicy: "pairing",
      groups: { "*": { requireMention: true } }
    }
  }
}

The token can live in the config file (channels.telegram.botToken), in the TELEGRAM_BOT_TOKEN environment variable, or in a token file — config wins if more than one is set. Then start (or restart) the Gateway and the channel comes up with it.

Step 3: pair yourself

Message your new bot and it won’t answer — by design. The default dmPolicy: "pairing" means unknown senders get a short-lived pairing code (they expire after an hour) instead of a conversation. On the machine running OpenClaw:

openclaw pairing list telegram
openclaw pairing approve telegram <CODE>

After approval, you’re talking to your agent. This little ceremony is load-bearing security, not friction for its own sake: your bot’s username is guessable public namespace, and pairing is what makes strangers finding it a non-event. The stricter alternative is allowlist (only pre-listed numeric user IDs get through); the open policy answers anyone and belongs nowhere near an agent with real capabilities. In group chats, keep requireMention: true — the agent only responds when addressed.

Why nothing got exposed just now

Worth appreciating: you just gave your agent a public face without opening a single port. OpenClaw’s Telegram channel uses long polling by default — the Gateway dials out to Telegram’s API and asks for new messages; Telegram never connects in. No public URL, no webhook, no firewall change, no Gateway on the internet. (A webhook mode exists for operators who want push delivery, but it requires deliberately standing up public ingress — if you’re asking whether you need it, you don’t.)

This is also the pattern to internalize about OpenClaw channels generally: daily conversation flows through outbound connections to chat services, which is why a well-set-up agent needs no inbound exposure at all. On Everpod pods, Telegram setup is exactly this flow — you bring the BotFather token, the pairing approval is part of onboarding, and the no-exposed-ports part is already guaranteed.

Don’t want to run it yourself?

Everpod hosts OpenClaw for you: a private, always-on cloud computer of your agent’s own — set up, secured, and backed up, with its software kept up to date. You bring your model key and say hello.

Request early access
$29/mo · your own model key · cancel anytime