关注我们

出海网公众号

出海网小程序

出海网视频号

出海网社群

状态:内置插件,通过 HTTP 与 BlueBubbles macOS 服务器通信。由于其更丰富的 API 和更简便的设置,推荐用于 iMessage 集成,优于旧版 imsg 渠道。
GET /api/v1/ping、POST /message/text、POST /chat/:id/*)。/channels/pairing等),使用channels.bluebubbles.allowFrom配对码。在你的 Mac 上安装 BlueBubbles 服务器(按照bluebubbles.app/install的说明操作)。
在 BlueBubbles 配置中,启用 web API 并设置密码。
运行openclaw onboard并选择 BlueBubbles,或手动配置:
{ channels: { bluebubbles: { enabled: true, serverUrl: "http://192.168.1.100:1234", password: "example-password", webhookPath: "/bluebubbles-webhook", }, }, }将 BlueBubbles webhook 指向你的 Gateway 网关(示例:https://your-gateway-host:3000/bluebubbles-webhook?password=<password)。
启动 Gateway 网关;它将注册 webhook 处理程序并开始配对。
BlueBubbles 可在交互式设置向导中使用:
向导会提示输入:
http://192.168.1.100:1234)/bluebubbles-webhook你也可以通过 CLI 添加 BlueBubbles:
openclaw channels add bluebubbles --http-url http://192.168.1.100:1234 --password <password
私信:
channels.bluebubbles.dmPolicy = "pairing"。openclaw pairing list bluebubblesopenclaw pairing approve bluebubbles <CODE群组:
channels.bluebubbles.groupPolicy = open | allowlist | disabled(默认:allowlist)。allowlist时,channels.bluebubbles.groupAllowFrom控制谁可以在群组中触发。BlueBubbles 支持群聊的提及门控,与 iMessage/WhatsApp 行为一致:
agents.list[].groupChat.mentionPatterns(或messages.groupChat.mentionPatterns)检测提及。requireMention时,智能体仅在被提及时响应。单群组配置:
{ channels: { bluebubbles: { groupPolicy: "allowlist", groupAllowFrom: ["+15555550123"], groups: { "*": { requireMention: true }, // 所有群组的默认设置 "iMessage;-;chat123": { requireMention: false }, // 特定群组的覆盖设置 }, }, }, }/config、/model)需要授权。allowFrom和groupAllowFrom确定命令授权。channels.bluebubbles.sendReadReceipts控制(默认:true)。{ channels: { bluebubbles: { sendReadReceipts: false, // 禁用已读回执 }, }, }BlueBubbles 在配置中启用时支持高级消息操作:
{ channels: { bluebubbles: { actions: { reactions: true, // tapback(默认:true) edit: true, // 编辑已发送消息(macOS 13+,在 macOS 26 Tahoe 上不可用) unsend: true, // 撤回消息(macOS 13+) reply: true, // 通过消息 GUID 进行回复线程 sendWithEffect: true, // 消息效果(slam、loud 等) renameGroup: true, // 重命名群聊 setGroupIcon: true, // 设置群聊图标/照片(在 macOS 26 Tahoe 上不稳定) addParticipant: true, // 将参与者添加到群组 removeParticipant: true, // 从群组移除参与者 leaveGroup: true, // 离开群聊 sendAttachment: true, // 发送附件/媒体 }, }, }, }可用操作:
messageId、emoji、remove)messageId、text)messageId)messageId、text、to)text、to、effectId)chatGuid、displayName)chatGuid、media)— 在 macOS 26 Tahoe 上不稳定(API 可能返回成功但图标未同步)。chatGuid、address)chatGuid、address)chatGuid)to、buffer、filename、asVoice)asVoice: true与MP3或CAF音频一起设置,以 iMessage 语音消息形式发送。BlueBubbles 在发送语音备忘录时会将 MP3 转换为 CAF。OpenClaw 可能会显示短消息 ID(例如1、2)以节省 token。
MessageSid/ReplyToId可以是短 ID。MessageSidFull/ReplyToIdFull包含提供商的完整 ID。messageId,但如果短 ID 不再可用将会报错。对于持久化自动化和存储,请使用完整 ID:
{{MessageSidFull}}、{{ReplyToIdFull}}MessageSidFull/ReplyToIdFull参见配置了解模板变量。
控制响应是作为单条消息发送还是分块流式传输:
{ channels: { bluebubbles: { blockStreaming: true, // 启用分块流式传输(默认关闭) }, }, }channels.bluebubbles.mediaMaxMb设置(默认:8 MB)。channels.bluebubbles.textChunkLimit分块(默认:4000 字符)。完整配置:配置提供商选项:
channels.bluebubbles.enabled:启用/禁用渠道。channels.bluebubbles.serverUrl:BlueBubbles REST API 基础 URL。channels.bluebubbles.password:API 密码。channels.bluebubbles.webhookPath:Webhook 端点路径(默认:/bluebubbles-webhook)。channels.bluebubbles.dmPolicy:pairing | allowlist | open | disabled(默认:pairing)。channels.bluebubbles.allowFrom:私信白名单(句柄、电子邮件、E.164 号码、chat_id:*、chat_guid:*)。channels.bluebubbles.groupPolicy:open | allowlist | disabled(默认:allowlist)。channels.bluebubbles.groupAllowFrom:群组发送者白名单。channels.bluebubbles.groups:单群组配置(requireMention等)。channels.bluebubbles.sendReadReceipts:发送已读回执(默认:true)。channels.bluebubbles.blockStreaming:启用分块流式传输(默认:false;流式回复必需)。channels.bluebubbles.textChunkLimit:出站分块大小(字符)(默认:4000)。channels.bluebubbles.chunkMode:length(默认)仅在超过textChunkLimit时分割;newline在长度分块前先按空行(段落边界)分割。channels.bluebubbles.mediaMaxMb:入站媒体上限(MB)(默认:8)。channels.bluebubbles.historyLimit:上下文的最大群组消息数(0 表示禁用)。channels.bluebubbles.dmHistoryLimit:私信历史限制。channels.bluebubbles.actions:启用/禁用特定操作。channels.bluebubbles.accounts:多账户配置。相关全局选项:
agents.list[].groupChat.mentionPatterns(或messages.groupChat.mentionPatterns)。messages.responsePrefix。优先使用chat_guid以获得稳定的路由:
chat_guid:iMessage;-;+15555550123(群组推荐)chat_id:123chat_identifier:...+15555550123、user@example.comPOST /api/v1/chat/new创建一个。这需要启用 BlueBubbles Private API。guid/password查询参数或头部与channels.bluebubbles.password进行身份验证。来自localhost的请求也会被接受。gateway.trustedProxies。参见Gateway 网关安全性。channels.bluebubbles.webhookPath匹配。openclaw pairing list bluebubbles和openclaw pairing approve bluebubbles <code。POST /api/v1/message/react);确保服务器版本支持它。channels.bluebubbles.actions.edit=false手动禁用。openclaw status --all或openclaw status --deep。