Skip to main content
This page connects a Telegram bot to OpenClaw and sets who is allowed to message it. Telegram is production-ready for bot DMs and groups via grammY. Long polling is the default transport. Webhook mode is optional.

Pairing

Default DM policy for Telegram is pairing.

Channel troubleshooting

Cross-channel diagnostics and repair playbooks.

Gateway configuration

Full channel config patterns and examples.

What each page covers

Where each section moved

Every section heading from the previous single-page version keeps its anchor here, so an existing link such as /channels/telegram#troubleshooting still resolves. Each entry points at the page that now holds the content.

Configuration reference

Primary reference: Configuration reference - Telegram. openclaw doctor --fix removes retired tuning settings (timeoutSeconds, mediaGroupFlushMs, pollingStallThresholdMs, retry, and errorCooldownMs) from their former configuration scopes. Account names and sender-specific tool-policy keys are preserved, even when they match a retired setting name.
  • startup/auth: enabled, botToken, tokenFile (must be a regular file; symlinks are rejected), accounts.*
  • access control: dmPolicy, allowFrom, direct.*.tools, direct.*.toolsBySender, groupPolicy, groupAllowFrom, groups, groups.*.topics.*, top-level bindings[] (type: "acp")
  • group introductions: joinIntro, accounts.*.joinIntro (default: true)
  • topic defaults: groups.<chatId>.topics."*" applies to unmatched forum topics; exact topic IDs override it
  • exec approvals: execApprovals, accounts.*.execApprovals
  • command/menu: commands.native, commands.nativeSkills, customCommands
  • threading/replies: replyToMode, threadBindings
  • streaming: streaming (modes off | partial | block | progress), streaming.preview.toolProgress
  • formatting/delivery: textChunkLimit, streaming.chunkMode, richMessages, markdown.tables (off | bullets | code | block), linkPreview, responsePrefix
  • media/network: mediaMaxMb, network.autoSelectFamily, network.dangerouslyAllowPrivateNetwork, proxy
  • custom API root: apiRoot (Bot API root only; do not include /bot<TOKEN>), trustedLocalFileRoots (self-hosted Bot API absolute file_path roots)
  • webhook: webhookUrl, webhookSecret, webhookPath, webhookHost, webhookPort, webhookCertPath
  • actions/capabilities: capabilities.inlineButtons, actions.sendMessage|editMessage|deleteMessage|reactions|sticker|createForumTopic|editForumTopic
  • reactions: reactionNotifications, reactionLevel
  • errors: errorPolicy, silentErrorReplies
  • writes/history: configWrites, historyLimit, dmHistoryLimit, dms.*.historyLimit
Multi-account precedence: with two or more account IDs configured, set channels.telegram.defaultAccount (or include channels.telegram.accounts.default) to make default routing explicit. Otherwise OpenClaw falls back to the first normalized account ID and openclaw doctor warns. Omitted account dmPolicy, groupPolicy, allowFrom, and groupAllowFrom inherit the channel root, not accounts.default.*. Explicit account policies win; if neither scope sets them, DMs use pairing and groups use allowlist.

Multi-agent account ownership

Each Telegram account needs a resolvable agent owner. To bind the default account to main, add this entry to the top-level bindings array:
validate=false
Use the configured agent and account IDs for your Gateway. A missing owner leaves that account blocked with the exact binding remediation in channel status; other accounts keep running. Add the binding and restart the Gateway. When upgrading a legacy agents.list config, Doctor preserves the previous implicit account owner in a binding before saving explicit ownership. Doctor requires the original roster and never promotes a narrower conversation route to account-wide ownership. Missing historical ownership requires an operator choice; Doctor reports the exact binding to add without changing existing routes. See migration repairs.

Pairing

Pair a Telegram user to the gateway.

Reactions

Emoji reaction semantics for the message tool.

Groups

Group and topic allowlist behavior.

Channel routing

Route inbound messages to agents.

Security

Threat model and hardening.

Multi-agent routing

Map groups and topics to agents.

Troubleshooting

Cross-channel diagnostics.