Skip to content

补充章

  • 除飞书外,OpenClaw 官方渠道如何按“最小路径”接入;
  • 哪些是内置渠道,哪些需要先安装插件;
  • 每个渠道最关键的配置项与第一条消息验证动作;
  • 一套跨渠道通用的排障顺序。

15.1 使用方式:先选渠道,再照抄最小路径

Section titled “15.1 使用方式:先选渠道,再照抄最小路径”

建议按这个顺序执行,避免新手“同时改太多”:

  1. 先确认第 2 章已跑通(Web UI 可稳定对话);
  2. 在本章只选 一个 渠道接入,不并行配置;
  3. 先完成私聊打通,再放开群聊/频道;
  4. 若报错,先看 openclaw channels status --probeopenclaw logs --follow

官方群消息通用流程(原图搬运,来源:docs/zh-CN/channels/groups.md):

群消息流程(官方原图)

来源:

15.2 内置渠道(无需额外安装插件)

Section titled “15.2 内置渠道(无需额外安装插件)”
  • 官方来源:https://docs.openclaw.ai/channels/telegram
  • 最小步骤:
    1. @BotFather 创建 bot,保存 token;
    2. 配置 TELEGRAM_BOT_TOKENchannels.telegram.botToken
    3. 启动网关并审批首次配对。
  • 最小配置(官方示例):
{
channels: {
telegram: {
enabled: true,
botToken: "123:abc",
dmPolicy: "pairing",
},
},
}
  • 官方来源:https://docs.openclaw.ai/channels/whatsapp
  • 最小步骤:
    1. 建议使用独立手机号;
    2. 配置 channels.whatsapp
    3. 执行 openclaw channels login --channel whatsapp 扫码绑定;
    4. 启动 Gateway,验证私聊收发。
  • 最小配置(官方示例):
{
channels: {
whatsapp: {
dmPolicy: "allowlist",
allowFrom: ["+15551234567"],
},
},
}
  • 官方来源:https://docs.openclaw.ai/channels/discord
  • 最小步骤(按官方 Quick setup 补齐):
    1. 打开 https://discord.com/developers/applications,新建应用并创建 Bot;
    2. 在 Bot 页面开启 Message Content Intent(必开);
    3. 若要做成员/角色允许列表,再开启 Server Members Intent
    4. 复制 Bot Token(Reset Token 后复制);
    5. 在 OAuth2 URL Generator 勾选 bot + applications.commands
    6. 在 Bot Permissions 至少勾选 View Channels / Send Messages / Read Message History / Embed Links / Attach Files
    7. 页面底部会出现 Generated URL,点击 Copy 后粘贴到浏览器打开,选择目标服务器,点 Continue + Authorize 完成安装;
    8. 确认 Bot 已出现在目标服务器成员列表,再继续下一步;
    9. 在 Discord 客户端打开 Developer Mode,复制 Server IDChannel IDUser ID(后续做 allowlist 要用);
    10. 先在 OpenClaw 主机写入 token 并启动网关;
    11. 默认走 Ask Your Agent(你已在前文打通飞书/WebUI):在已有对话渠道里请 Agent 完成 Discord 剩余配置与配对审批。
  • 建议命令(先配 token,再跑网关):
Terminal window
openclaw config set channels.discord.token '"YOUR_BOT_TOKEN"' --json
Terminal window
openclaw config set channels.discord.enabled true --json
Terminal window
openclaw gateway restart

首次私聊后,默认在已打通渠道里发给 Agent:

我已经在本机配置了 Discord token。请继续完成 Discord 接入,并批准这个 pairing code:<CODE>

若你选择手工审批,再执行:

Terminal window
openclaw pairing list discord
Terminal window
openclaw pairing approve discord <CODE>
  • 最小配置(官方示例):
{
channels: {
discord: {
enabled: true,
token: "YOUR_BOT_TOKEN",
},
},
}

经验提示:如果 Bot 在线但不回消息,先回头检查 Intent 和 Bot Permissions;另外确认你不是只“勾选了权限”却没执行 Generated URL 的浏览器授权安装。

  • 官方来源:https://docs.openclaw.ai/channels/slack
  • 最小步骤(Socket):
    1. 在 Slack App 开启 Socket Mode
    2. 在 Slack App 中拿到 xapp-...xoxb-...
    3. 配置 channels.slack.appTokenchannels.slack.botToken
    4. 启动 Gateway 并邀请 bot 入频道。
  • 最小配置(官方示例):
{
channels: {
slack: {
enabled: true,
appToken: "xapp-...",
botToken: "xoxb-...",
},
},
}
  • 官方来源:https://docs.openclaw.ai/channels/googlechat
  • 最小步骤:
    1. 在 Google Cloud 启用 Chat API;
    2. 创建 Service Account 并下载 JSON 密钥;
    3. 在 Google Chat 配置应用与 webhook;
    4. 在 OpenClaw 配置 serviceAccountFile 和 webhook audience;
    5. 启动 Gateway 验证首条消息。
  • 官方来源:https://docs.openclaw.ai/channels/signal
  • 最小步骤:
    1. 安装 signal-cli(需要 Java);
    2. signal-cli link -n "OpenClaw" 绑定设备;
    3. 配置 channels.signal
    4. 启动 Gateway 验证收发。
  • 最小配置(官方示例):
{
channels: {
signal: {
enabled: true,
account: "+15551234567",
cliPath: "signal-cli",
dmPolicy: "pairing",
allowFrom: ["+15557654321"],
},
},
}

15.2.7 BlueBubbles(推荐 iMessage 路线)

Section titled “15.2.7 BlueBubbles(推荐 iMessage 路线)”
  • 官方来源:https://docs.openclaw.ai/channels/bluebubbles
  • 最小步骤:
    1. 在 macOS 安装 BlueBubbles Server 并启用 Web API;
    2. 配置 serverUrlpasswordwebhookPath
    3. 将 BlueBubbles webhook 指向 Gateway;
    4. 启动 Gateway 后验证私聊收发。
  • 最小配置(官方示例):
{
channels: {
bluebubbles: {
enabled: true,
serverUrl: "http://192.168.1.100:1234",
password: "example-password",
webhookPath: "/bluebubbles-webhook",
},
},
}
  • 官方来源:https://docs.openclaw.ai/channels/imessage
  • 最小步骤:
    1. Mac 上登录“信息”应用;
    2. 安装 imsg(示例:brew install steipete/tap/imsg);
    3. 配置 channels.imessage.cliPathdbPath
    4. 启动 Gateway 并授权 macOS 自动化权限。
  • 官方来源:https://docs.openclaw.ai/channels/irc
  • 说明:截至 2026-02-17,zh-CN/channels 中未提供 IRC 条目,本节依据官方英文页整理。
  • 最小步骤:
    1. 配置 hostporttlsnickchannels
    2. 启动或重启 Gateway(文档示例命令为 openclaw gateway run);
    3. 保持默认 dmPolicy: pairinggroupPolicy: allowlist,先打通私聊再放开群聊。

15.3 插件渠道(先装插件,再配置)

Section titled “15.3 插件渠道(先装插件,再配置)”

先执行通用动作:

Terminal window
openclaw plugins list

若目标插件未启用,按渠道安装。

Terminal window
openclaw plugins install @openclaw/mattermost

最小路径:创建 Mattermost bot → 拿 botTokenbaseUrl → 写入配置 → 启动 Gateway。 关键配置:channels.mattermost.botTokenchannels.mattermost.baseUrl

Terminal window
openclaw plugins install @openclaw/msteams

最小路径:装插件 → 建 Azure Bot → 配 appId/appPassword/tenantId → 暴露 /api/messages(默认 3978)→ 启动 Gateway。 关键配置:channels.msteams.appIdappPasswordtenantIdwebhook

Terminal window
openclaw plugins install @openclaw/line

最小路径:LINE Developers 建 Messaging API 应用 → 打开 webhook → 配 token/secret → 启动 Gateway。 关键配置:channels.line.channelAccessTokenchannelSecretwebhookPath(默认 /line/webhook)。

Terminal window
openclaw plugins install @openclaw/nextcloud-talk

最小路径:装插件 → 用 occ talk:bot:install 建 bot → 配 baseUrl/botSecret → 启动 Gateway。 关键配置:channels.nextcloud-talk.baseUrlchannels.nextcloud-talk.botSecret

Terminal window
openclaw plugins install @openclaw/matrix

最小路径:装插件 → 准备 Matrix 账号与 accessToken → 配置 homeserver/token → 启动 Gateway。 关键配置:channels.matrix.homeserveraccessToken、(可选)encryption: true

Terminal window
openclaw plugins install @openclaw/nostr

最小路径:装插件 → 生成 nsec 私钥(可用 nak key generate)→ 配 privateKey → 重启 Gateway。 关键配置:channels.nostr.privateKeyrelays

Terminal window
openclaw plugins install @openclaw/tlon

最小路径:装插件 → 获取 Urbit ship URL + 登录码 → 配 ship/url/code → 重启 Gateway。 关键配置:channels.tlon.shipurlcode

Terminal window
openclaw plugins install @openclaw/twitch

最小路径:装插件 → 生成 Twitch accessToken + clientId → 配目标频道与访问控制 → 启动 Gateway。 关键配置:channels.twitch.usernamechannelaccessTokenclientIdallowFrom

Terminal window
openclaw plugins install @openclaw/zalo

最小路径:装插件(若 npm 包不可用,则走本地扩展路径)→ 配 botToken → 重启 Gateway。 关键配置:channels.zalo.botToken(或 tokenFile)。

Terminal window
openclaw plugins install @openclaw/zalouser

最小路径:装插件 → openclaw channels login --channel zalouser 扫码登录 → 启用渠道并重启 Gateway。 关键配置:先确保主机可用 zca-cli,并完成账号映射。

15.4 统一排障顺序(所有渠道通用)

Section titled “15.4 统一排障顺序(所有渠道通用)”

按固定顺序排,不要跳步:

  1. 看插件状态:
Terminal window
openclaw plugins list
  1. 看渠道状态(含探测):
Terminal window
openclaw channels status --probe
  1. 看 Gateway 状态:
Terminal window
openclaw gateway status
  1. 看实时日志:
Terminal window
openclaw logs --follow
  1. 每次只改一个变量(例如只改 token 或只改回调 URL),改完即复测。

本章可作为“渠道接入速查字典”:

  • 飞书主线看第 8 章;
  • 其他渠道按本章索引选一条执行;
  • 全部渠道都用同一套排障顺序,避免盲猜。
  1. 本章每个渠道步骤均可在 docs.openclaw.ai/channels/* 对应页找到原始依据(核验时间:2026-02-17)。
  2. 插件渠道可通过 openclaw plugins install @openclaw/<plugin> 安装并在配置中启用。
  3. 渠道接入可统一抽象为“平台凭证 → OpenClaw 配置 → Gateway 启动 → 首条消息验证”。
  4. IRC 的中文文档条目在 zh-CN/channels 中暂缺,本章 IRC 段落基于官方英文页整理。