Production-ready for bot DMs and groups via grammY. Long polling is the default mode; webhook mode is optional.Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
Pairing
Default DM policy for Telegram is pairing.
Channel troubleshooting
Cross-channel diagnostics and repair playbooks.
Gateway configuration
Full channel config patterns and examples.
Quick setup
Create the bot token in BotFather
Open Telegram and chat with @BotFather (confirm the handle is exactly
@BotFather).Run /newbot, follow prompts, and save the token.Configure token and DM policy
TELEGRAM_BOT_TOKEN=... (default account only).
Telegram does not use openclaw channels login telegram; configure token in config/env, then start gateway.Token resolution order is account-aware. In practice, config values win over env fallback, and
TELEGRAM_BOT_TOKEN only applies to the default account.Telegram side settings
Privacy mode and group visibility
Privacy mode and group visibility
Telegram bots default to Privacy Mode, which limits what group messages they receive.If the bot must see all group messages, either:
- disable privacy mode via
/setprivacy, or - make the bot a group admin.
Group permissions
Group permissions
Admin status is controlled in Telegram group settings.Admin bots receive all group messages, which is useful for always-on group behavior.
Helpful BotFather toggles
Helpful BotFather toggles
/setjoingroupsto allow/deny group adds/setprivacyfor group visibility behavior
Access control and activation
- DM policy
- Group policy and allowlists
- Mention behavior
channels.telegram.dmPolicy controls direct message access:pairing(default)allowlist(requires at least one sender ID inallowFrom)open(requiresallowFromto include"*")disabled
dmPolicy: "open" with allowFrom: ["*"] lets any Telegram account that finds or guesses the bot username command the bot. Use it only for intentionally public bots with tightly restricted tools; one-owner bots should use allowlist with numeric user IDs.channels.telegram.allowFrom accepts numeric Telegram user IDs. telegram: / tg: prefixes are accepted and normalized.
In multi-account configs, a restrictive top-level channels.telegram.allowFrom is treated as a safety boundary: account-level allowFrom: ["*"] entries do not make that account public unless the effective account allowlist still contains an explicit wildcard after merging.
dmPolicy: "allowlist" with empty allowFrom blocks all DMs and is rejected by config validation.
Setup asks for numeric user IDs only.
If you upgraded and your config contains @username allowlist entries, run openclaw doctor --fix to resolve them (best-effort; requires a Telegram bot token).
If you previously relied on pairing-store allowlist files, openclaw doctor --fix can recover entries into channels.telegram.allowFrom in allowlist flows (for example when dmPolicy: "allowlist" has no explicit IDs yet).For one-owner bots, prefer dmPolicy: "allowlist" with explicit numeric allowFrom IDs to keep access policy durable in config (instead of depending on previous pairing approvals).Common confusion: DM pairing approval does not mean “this sender is authorized everywhere”.
Pairing grants DM access. If no command owner exists yet, the first approved pairing also sets commands.ownerAllowFrom so owner-only commands and exec approvals have an explicit operator account.
Group sender authorization still comes from explicit config allowlists.
If you want “I am authorized once and both DMs and group commands work”, put your numeric Telegram user ID in channels.telegram.allowFrom; for owner-only commands, make sure commands.ownerAllowFrom contains telegram:<your user id>.Finding your Telegram user ID
Safer (no third-party bot):- DM your bot.
- Run
openclaw logs --follow. - Read
from.id.
@userinfobot or @getidsbot.Runtime behavior
- Telegram is owned by the gateway process.
- Routing is deterministic: Telegram inbound replies back to Telegram (the model does not pick channels).
- Inbound messages normalize into the shared channel envelope with reply metadata and media placeholders.
- Group sessions are isolated by group ID. Forum topics append
:topic:<threadId>to keep topics isolated. - DM messages can carry
message_thread_id; OpenClaw routes them with thread-aware session keys and preserves thread ID for replies. - Long polling uses grammY runner with per-chat/per-thread sequencing. Overall runner sink concurrency uses
agents.defaults.maxConcurrent. - Long polling is guarded inside each gateway process so only one active poller can use a bot token at a time. If you still see
getUpdates409 conflicts, another OpenClaw gateway, script, or external poller is likely using the same token. - Long-polling watchdog restarts trigger after 120 seconds without completed
getUpdatesliveness by default. Increasechannels.telegram.pollingStallThresholdMsonly if your deployment still sees false polling-stall restarts during long-running work. The value is in milliseconds and is allowed from30000to600000; per-account overrides are supported. - Telegram Bot API has no read-receipt support (
sendReadReceiptsdoes not apply).
Feature reference
Live stream preview (message edits)
Live stream preview (message edits)
OpenClaw can stream partial replies in real time:Use
- direct chats: preview message +
editMessageText - groups/topics: preview message +
editMessageText
channels.telegram.streamingisoff | partial | block | progress(default:partial)progressmaps topartialon Telegram (compat with cross-channel naming)streaming.preview.toolProgresscontrols whether tool/progress updates reuse the same edited preview message (default:truewhen preview streaming is active)- legacy
channels.telegram.streamModeand booleanstreamingvalues are detected; runopenclaw doctor --fixto migrate them tochannels.telegram.streaming.mode
v2026.4.22 and later. To keep the edited preview for answer text but hide tool-progress lines, set:streaming.mode: "off" only when you want final-only delivery: Telegram preview edits are disabled and generic tool/progress chatter is suppressed instead of being sent as standalone “Working…” messages. Approval prompts, media payloads, and errors still route through normal final delivery. Use streaming.preview.toolProgress: false when you only want to keep answer preview edits while hiding the tool-progress status lines.For text-only replies:- 簡短的私訊/群組/主題預覽:OpenClaw 會保留相同的預覽訊息,並在原處執行最終編輯
- 超過約一分鐘的預覽:OpenClaw 會將完成的回覆作為新的最終訊息送出,然後清理預覽,因此 Telegram 可見的時間戳會反映完成時間,而不是預覽建立時間
sendMessage + editMessageText。僅限 Telegram 的 reasoning 串流:/reasoning stream會在生成時將 reasoning 傳送到即時預覽- 最終答案會在不含 reasoning 文字的情況下送出
格式化與 HTML 退回
格式化與 HTML 退回
對外文字使用 Telegram
parse_mode: "HTML"。- 類似 Markdown 的文字會轉譯為 Telegram 安全的 HTML。
- 原始模型 HTML 會被逸出,以減少 Telegram 解析失敗。
- 如果 Telegram 拒絕已解析的 HTML,OpenClaw 會以純文字重試。
channels.telegram.linkPreview: false 停用。原生命令與自訂命令
原生命令與自訂命令
Telegram 命令選單註冊會在啟動時透過 規則:裝置配對命令(
安裝
setMyCommands 處理。原生命令預設值:commands.native: "auto"會為 Telegram 啟用原生命令
- 名稱會正規化(移除開頭的
/、轉為小寫) - 有效模式:
a-z、0-9、_,長度1..32 - 自訂命令不能覆寫原生命令
- 衝突/重複項目會被略過並記錄
- 自訂命令只是選單項目;它們不會自動實作行為
- plugin/skill 命令即使未顯示在 Telegram 選單中,輸入時仍可運作
setMyCommands failed搭配BOT_COMMANDS_TOO_MUCH表示 Telegram 選單在修剪後仍然超出限制;請減少 plugin/skill/custom 命令,或停用channels.telegram.commands.native。- 當直接使用 Bot API curl 命令可運作,但
deleteWebhook、deleteMyCommands或setMyCommands因404: Not Found失敗時,可能表示channels.telegram.apiRoot被設定為完整的/bot<TOKEN>端點。apiRoot必須只包含 Bot API 根路徑,而openclaw doctor --fix會移除意外尾隨的/bot<TOKEN>。 getMe returned 401表示 Telegram 拒絕已設定的 bot token。請使用目前的 BotFather token 更新botToken、tokenFile或TELEGRAM_BOT_TOKEN;OpenClaw 會在輪詢前停止,因此這不會被回報為 Webhook 清理失敗。setMyCommands failed搭配網路/fetch 錯誤,通常表示對api.telegram.org的對外 DNS/HTTPS 被封鎖。
裝置配對命令(device-pair plugin)
安裝 device-pair plugin 時:/pair產生設定程式碼- 將程式碼貼到 iOS app
/pair pending列出待處理請求(包含角色/scopes)- 核准請求:
/pair approve <requestId>用於明確核准/pair approve用於只有一個待處理請求時/pair approve latest用於最近一筆
scopes: [];任何已交接的 operator token 都會限制在 operator.approvals、operator.read、operator.talk.secrets 和 operator.write。Bootstrap scope 檢查會加上角色前綴,因此該 operator allowlist 只滿足 operator 請求;非 operator 角色仍需要其自身角色前綴下的 scopes。如果裝置以變更後的驗證詳細資料重試(例如角色/scopes/公開金鑰),先前的待處理請求會被取代,新請求會使用不同的 requestId。核准前請重新執行 /pair pending。更多詳細資訊:配對。行內按鈕
行內按鈕
供 agent 與自動化使用的 Telegram 訊息動作
供 agent 與自動化使用的 Telegram 訊息動作
Telegram 工具動作包含:
sendMessage(to、content、選用mediaUrl、replyToMessageId、messageThreadId)react(chatId、messageId、emoji)deleteMessage(chatId、messageId)editMessage(chatId、messageId、content)createForumTopic(chatId、name、選用iconColor、iconCustomEmojiId)
send、react、delete、edit、sticker、sticker-search、topic-create)。Gate 控制:channels.telegram.actions.sendMessagechannels.telegram.actions.deleteMessagechannels.telegram.actions.reactionschannels.telegram.actions.sticker(預設:停用)
edit 和 topic-create 目前預設啟用,且沒有個別的 channels.telegram.actions.* 切換。
Runtime 傳送會使用作用中的 config/secrets 快照(啟動/重新載入),因此動作路徑不會在每次傳送時執行臨時 SecretRef 重新解析。反應移除語意:/tools/reactions回覆 threading 標籤
回覆 threading 標籤
Telegram 支援在生成輸出中使用明確的回覆 threading 標籤:
[[reply_to_current]]回覆觸發訊息[[reply_to:<id>]]回覆特定 Telegram 訊息 ID
channels.telegram.replyToMode 控制處理方式:off(預設)firstall
off 會停用隱含回覆 threading。明確的 [[reply_to_*]] 標籤仍會被遵循。論壇主題與 thread 行為
論壇主題與 thread 行為
論壇 supergroups:接著每個主題都有自己的 session key:
- 主題 session keys 會附加
:topic:<threadId> - 回覆與 typing 會以主題 thread 為目標
- 主題 config 路徑:
channels.telegram.groups.<chatId>.topics.<threadId>
threadId=1)特殊情況:- 訊息傳送會省略
message_thread_id(Telegram 會拒絕sendMessage(...thread_id=1)) - typing 動作仍會包含
message_thread_id
requireMention、allowFrom、skills、systemPrompt、enabled、groupPolicy)。
agentId 只屬於主題,不會從群組預設值繼承。每個主題的 agent 路由:每個主題都可以透過在主題 config 中設定 agentId 路由到不同的 agent。這讓每個主題都有自己的隔離工作區、記憶體和 session。範例:agent:zu:telegram:group:-1001234567890:topic:3持久 ACP 主題綁定:論壇主題可透過頂層 typed ACP bindings(bindings[] 搭配 type: "acp"、match.channel: "telegram"、peer.kind: "group",以及類似 -1001234567890:topic:42 的主題限定 id)釘選 ACP harness sessions。目前範圍限於 groups/supergroups 中的論壇主題。請參閱 ACP Agents。從聊天室產生 thread-bound ACP:/acp spawn <agent> --thread here|auto 會將目前主題綁定到新的 ACP session;後續訊息會直接路由至該處。OpenClaw 會將 spawn 確認釘選在主題內。需要 channels.telegram.threadBindings.spawnAcpSessions=true。Template context 會公開 MessageThreadId 和 IsForum。帶有 message_thread_id 的私訊聊天室會保留私訊路由,但使用 thread-aware session keys。音訊、影片與貼圖
音訊、影片與貼圖
音訊訊息
Telegram 會區分語音備忘 vs 音訊檔案。- 預設:音訊檔案行為
- 在 agent 回覆中加入標籤
[[audio_as_voice]]以強制作為語音備忘傳送 - 內送語音備忘逐字稿會在 agent context 中被標示為機器生成、 不受信任的文字;提及偵測仍會使用原始 逐字稿,因此受提及 gate 控制的語音訊息仍可運作。
影片訊息
Telegram 會區分影片檔案 vs 影片備忘。訊息動作範例:貼圖
內送貼圖處理:- 靜態 WEBP:下載並處理(placeholder
<media:sticker>) - 動畫 TGS:略過
- 影片 WEBM:略過
Sticker.emojiSticker.setNameSticker.fileIdSticker.fileUniqueIdSticker.cachedDescription
~/.openclaw/telegram/sticker-cache.json
反應通知
反應通知
Telegram 反應會以
message_reaction updates 抵達(與訊息 payloads 分開)。啟用後,OpenClaw 會將如下系統事件排入佇列:Telegram reaction added: 👍 by Alice (@alice) on msg 42
channels.telegram.reactionNotifications:off | own | all(預設:own)channels.telegram.reactionLevel:off | ack | minimal | extensive(預設:minimal)
own表示僅限使用者對機器人傳送訊息的反應(透過已傳送訊息快取盡力處理)。- 反應事件仍會遵守 Telegram 存取控制(
dmPolicy、allowFrom、groupPolicy、groupAllowFrom);未授權的傳送者會被丟棄。 - Telegram 不會在反應更新中提供對話串 ID。
- 非論壇群組會路由到群組聊天工作階段
- 論壇群組會路由到群組的一般主題工作階段(
:topic:1),而不是確切的原始主題
allowed_updates 會自動包含 message_reaction。Ack 反應
Ack 反應
ackReaction 會在 OpenClaw 處理傳入訊息時傳送確認表情符號。解析順序:channels.telegram.accounts.<accountId>.ackReactionchannels.telegram.ackReactionmessages.ackReaction- agent 身分表情符號後援(
agents.list[].identity.emoji,否則為「👀」)
- Telegram 預期使用 unicode 表情符號(例如「👀」)。
- 使用
""可停用某個頻道或帳號的反應。
來自 Telegram 事件和命令的設定寫入
來自 Telegram 事件和命令的設定寫入
頻道設定寫入預設啟用(
configWrites !== false)。Telegram 觸發的寫入包含:- 群組遷移事件(
migrate_to_chat_id),用於更新channels.telegram.groups /config set和/config unset(需要啟用命令)
長輪詢與 Webhook
長輪詢與 Webhook
預設為長輪詢。若要使用 Webhook 模式,請設定
channels.telegram.webhookUrl 和 channels.telegram.webhookSecret;可選擇設定 webhookPath、webhookHost、webhookPort(預設為 /telegram-webhook、127.0.0.1、8787)。本機監聽器會繫結到 127.0.0.1:8787。若要使用公開入口,請在本機連接埠前方放置反向代理,或有意地設定 webhookHost: "0.0.0.0"。Webhook 模式會先驗證請求防護、Telegram 密鑰權杖和 JSON 本文,才向 Telegram 回傳 200。
OpenClaw 接著會透過與長輪詢相同的每聊天/每主題機器人通道非同步處理更新,因此緩慢的 agent 回合不會卡住 Telegram 的傳遞 ACK。限制、重試與 CLI 目標
限制、重試與 CLI 目標
channels.telegram.textChunkLimit預設為 4000。channels.telegram.chunkMode="newline"會在依長度分割前優先使用段落邊界(空白行)。channels.telegram.mediaMaxMb(預設 100)會限制傳入和傳出的 Telegram 媒體大小。channels.telegram.timeoutSeconds會覆寫 Telegram API 用戶端逾時(若未設定,則套用 grammY 預設值)。channels.telegram.pollingStallThresholdMs預設為120000;只有在輪詢停滯重新啟動出現誤判時,才在30000到600000之間調整。- 群組上下文歷史記錄使用
channels.telegram.historyLimit或messages.groupChat.historyLimit(預設 50);0會停用。 - 回覆/引用/轉寄的補充上下文目前會依收到的內容傳遞。
- Telegram 允許清單主要管控誰可以觸發 agent,而不是完整的補充上下文遮蔽邊界。
- 私訊歷史記錄控制:
channels.telegram.dmHistoryLimitchannels.telegram.dms["<user_id>"].historyLimit
channels.telegram.retry設定會套用到 Telegram 傳送輔助工具(CLI/工具/動作),用於可復原的傳出 API 錯誤。傳入最終回覆傳遞也會針對 Telegram 預連線失敗使用有界限的安全傳送重試,但不會重試可能造成可見訊息重複的不明確傳送後網路封包。
openclaw message poll,並支援論壇主題:--poll-duration-seconds(5-600)--poll-anonymous--poll-public--thread-id用於論壇主題(或使用:topic:目標)
- 當
channels.telegram.capabilities.inlineButtons允許時,搭配buttons區塊的--presentation可用於行內鍵盤 --pin或--delivery '{"pin":true}'可在機器人能於該聊天中釘選時要求釘選傳遞--force-document會將傳出圖片和 GIF 作為文件傳送,而不是使用壓縮相片或動畫媒體上傳
channels.telegram.actions.sendMessage=false會停用傳出的 Telegram 訊息,包括投票channels.telegram.actions.poll=false會停用 Telegram 投票建立,同時保留一般傳送啟用
Telegram 中的執行核准
Telegram 中的執行核准
Telegram 支援在核准者私訊中進行執行核准,也可以選擇在原始聊天或主題中發布提示。核准者必須是數值 Telegram 使用者 ID。設定路徑:
channels.telegram.execApprovals.enabled(至少可解析一位核准者時會自動啟用)channels.telegram.execApprovals.approvers(後援為commands.ownerAllowFrom中的數值擁有者 ID)channels.telegram.execApprovals.target:dm(預設)|channel|bothagentFilter,sessionFilter
channels.telegram.allowFrom、groupAllowFrom 和 defaultTo 控制誰可以和機器人對話,以及機器人將一般回覆傳送到哪裡。它們不會讓某人成為執行核准者。當尚未存在命令擁有者時,第一個核准的私訊配對會啟動 commands.ownerAllowFrom,因此單一擁有者設定仍可運作,而不必在 execApprovals.approvers 下重複 ID。頻道傳遞會在聊天中顯示命令文字;只有在受信任的群組/主題中才啟用 channel 或 both。當提示出現在論壇主題中時,OpenClaw 會為核准提示和後續訊息保留該主題。執行核准預設會在 30 分鐘後過期。行內核准按鈕也需要 channels.telegram.capabilities.inlineButtons 允許目標介面(dm、group 或 all)。以 plugin: 為前綴的核准 ID 會透過 Plugin 核准解析;其他 ID 會先透過執行核准解析。請參閱執行核准。錯誤回覆控制
當 agent 遇到傳遞或提供者錯誤時,Telegram 可以回覆錯誤文字,或隱藏錯誤。這個行為由兩個設定鍵控制:| 鍵 | 值 | 預設值 | 說明 |
|---|---|---|---|
channels.telegram.errorPolicy | reply, silent | reply | reply 會向聊天傳送友善的錯誤訊息。silent 會完全隱藏錯誤回覆。 |
channels.telegram.errorCooldownMs | number (ms) | 60000 | 對同一聊天傳送錯誤回覆之間的最短時間。可防止中斷期間出現錯誤垃圾訊息。 |
疑難排解
機器人未回應非提及群組訊息
機器人未回應非提及群組訊息
- 如果
requireMention=false,Telegram 隱私模式必須允許完整可見性。- BotFather:
/setprivacy-> Disable - 然後移除機器人並重新加入群組
- BotFather:
- 當設定預期未提及的群組訊息時,
openclaw channels status會發出警告。 openclaw channels status --probe可以檢查明確的數值群組 ID;萬用字元"*"無法探測成員資格。- 快速工作階段測試:
/activation always。
機器人完全看不到群組訊息
機器人完全看不到群組訊息
- 當
channels.telegram.groups存在時,群組必須列在其中(或包含"*") - 驗證機器人在群組中的成員資格
- 檢閱記錄:使用
openclaw logs --follow查看略過原因
命令只能部分運作或完全無法運作
命令只能部分運作或完全無法運作
- 授權你的傳送者身分(配對和/或數值
allowFrom) - 即使群組政策是
open,命令授權仍會套用 setMyCommands failed且出現BOT_COMMANDS_TOO_MUCH表示原生命令選單有太多項目;請減少 Plugin/skill/自訂命令,或停用原生選單deleteMyCommands/setMyCommands啟動呼叫有界限,且在請求逾時時會透過 Telegram 的傳輸後援重試一次。持續性的網路/擷取錯誤通常表示對api.telegram.org的 DNS/HTTPS 可達性問題
啟動回報未授權權杖
啟動回報未授權權杖
輪詢或網路不穩定
輪詢或網路不穩定
- Node 22+ + 自訂 fetch/proxy 可能會在 AbortSignal 型別不相符時觸發立即中止行為。
- 有些主機會先將
api.telegram.org解析為 IPv6;損壞的 IPv6 對外連線可能導致間歇性的 Telegram API 失敗。 - 如果日誌包含
TypeError: fetch failed或Network request for 'getUpdates' failed!,OpenClaw 現在會將這些作為可復原的網路錯誤重試。 - 如果日誌包含
Polling stall detected,OpenClaw 預設會在 120 秒內沒有完成長輪詢活性後,重新啟動輪詢並重建 Telegram 傳輸。 openclaw channels status --probe和openclaw doctor會在執行中的輪詢帳戶於啟動寬限期後尚未完成getUpdates、執行中的 webhook 帳戶於啟動寬限期後尚未完成setWebhook,或最後一次成功的輪詢傳輸活動已過舊時發出警告。- 只有在長時間執行的
getUpdates呼叫正常,但你的主機仍回報錯誤的輪詢停滯重新啟動時,才增加channels.telegram.pollingStallThresholdMs。持續停滯通常表示主機與api.telegram.org之間存在 proxy、DNS、IPv6 或 TLS 對外連線問題。 - Telegram 也會遵循 Bot API 傳輸的程序 proxy 環境變數,包括
HTTP_PROXY、HTTPS_PROXY、ALL_PROXY以及它們的小寫變體。NO_PROXY/no_proxy仍可繞過api.telegram.org。 - 如果服務環境透過
OPENCLAW_PROXY_URL設定了 OpenClaw 受管 proxy,且沒有標準 proxy 環境變數,Telegram 也會將該 URL 用於 Bot API 傳輸。 - 在直接對外連線/TLS 不穩定的 VPS 主機上,請透過
channels.telegram.proxy路由 Telegram API 呼叫:
- Node 22+ 預設為
autoSelectFamily=true(WSL2 除外)和dnsResultOrder=ipv4first。 - 如果你的主機是 WSL2,或明確以僅 IPv4 行為運作得更好,請強制指定位址族選擇:
- RFC 2544 基準測試範圍的答案(
198.18.0.0/15)預設已允許 用於 Telegram 媒體下載。如果受信任的 fake-IP 或 透明 proxy 在媒體下載期間將api.telegram.org重寫為其他 私有/內部/特殊用途位址,你可以選擇啟用僅限 Telegram 的繞過:
- 同樣的選擇啟用可在每個帳戶層級透過
channels.telegram.accounts.<accountId>.network.dangerouslyAllowPrivateNetwork使用。 - 如果你的 proxy 將 Telegram 媒體主機解析為
198.18.x.x,請先保持 危險旗標關閉。Telegram 媒體預設已允許 RFC 2544 基準測試範圍。
- 環境覆寫(暫時):
OPENCLAW_TELEGRAM_DISABLE_AUTO_SELECT_FAMILY=1OPENCLAW_TELEGRAM_ENABLE_AUTO_SELECT_FAMILY=1OPENCLAW_TELEGRAM_DNS_RESULT_ORDER=ipv4first
- 驗證 DNS 答案:
設定參考
主要參考:設定參考 - Telegram。高資訊量 Telegram 欄位
高資訊量 Telegram 欄位
- 啟動/驗證:
enabled、botToken、tokenFile、accounts.*(tokenFile必須指向一般檔案;符號連結會被拒絕) - 存取控制:
dmPolicy、allowFrom、groupPolicy、groupAllowFrom、groups、groups.*.topics.*、頂層bindings[](type: "acp") - exec 核准:
execApprovals、accounts.*.execApprovals - 指令/選單:
commands.native、commands.nativeSkills、customCommands - 執行緒/回覆:
replyToMode - 串流:
streaming(預覽)、streaming.preview.toolProgress、blockStreaming - 格式化/傳遞:
textChunkLimit、chunkMode、linkPreview、responsePrefix - 媒體/網路:
mediaMaxMb、timeoutSeconds、pollingStallThresholdMs、retry、network.autoSelectFamily、network.dangerouslyAllowPrivateNetwork、proxy - 自訂 API 根目錄:
apiRoot(僅 Bot API 根目錄;不要包含/bot<TOKEN>) - Webhook:
webhookUrl、webhookSecret、webhookPath、webhookHost - 動作/能力:
capabilities.inlineButtons、actions.sendMessage|editMessage|deleteMessage|reactions|sticker - 回應:
reactionNotifications、reactionLevel - 錯誤:
errorPolicy、errorCooldownMs - 寫入/歷史記錄:
configWrites、historyLimit、dmHistoryLimit、dms.*.historyLimit
多帳戶優先順序:設定兩個或更多帳戶 ID 時,請設定
channels.telegram.defaultAccount(或包含 channels.telegram.accounts.default),以明確指定預設路由。否則 OpenClaw 會退回到第一個正規化的帳戶 ID,且 openclaw doctor 會發出警告。命名帳戶會繼承 channels.telegram.allowFrom / groupAllowFrom,但不會繼承 accounts.default.* 值。相關
配對
將 Telegram 使用者與 Gateway 配對。
群組
群組與主題允許清單行為。
Channel 路由
將傳入訊息路由到代理。
安全性
威脅模型與強化。
多代理路由
將群組與主題對應到代理。
疑難排解
跨 Channel 診斷。