教程

OpenClaw 接入 BlueBubbles:iMessage 现代化接入方案完整配置

OpenClaw 接入 BlueBubbles iMessage 完整教程:BlueBubbles 服务器安装配置、Webhook 设置、DM 和群组访问控制、打字指示/已读回执、流式分块,以及 VM 无头服务器保持 Messages.app 活跃的 AppleScript 方案。

2026/3/23分钟 阅读ClaudeEagle

BlueBubbles 是 OpenClaw 推荐的 iMessage 接入方案,通过 macOS 上的 REST API 服务器提供更丰富的功能,取代了遗留的 imsg 集成。

BlueBubbles 的优势

相比遗留的 imsg 集成:

  • 支持编辑消息、撤回消息
  • 支持回复线程
  • 支持消息特效
  • 支持群组管理(改名、更换图标)
  • 支持 Tapback 反应
  • 支持打字指示和已读回执
  • 更稳定的 REST API,无需 JSON-RPC 通信

前置条件

  • macOS 设备(Sequoia 15 已验证,Tahoe 26 可用但部分功能受限)
  • 已登录 iMessage 的 Apple ID
  • BlueBubbles macOS 服务器应用(bluebubbles.app

第一步:安装并配置 BlueBubbles 服务器

  1. 访问 bluebubbles.app/install 下载并安装
  2. 在 BlueBubbles 设置中:
    • 启用 Web API
    • 设置 API 密码(务必设置!)
    • 记录服务器 URL(通常是 http://192.168.1.x:1234

第二步:配置 OpenClaw

json
{
  "channels": {
    "bluebubbles": {
      "enabled": true,
      "serverUrl": "http://192.168.1.100:1234",
      "password": "your-password",
      "webhookPath": "/bluebubbles-webhook"
    }
  }
}

也可以运行向导:

bash
openclaw onboard  # 选择 BlueBubbles

第三步:配置 BlueBubbles Webhook

在 BlueBubbles 服务器设置中,将 Webhook URL 指向 OpenClaw Gateway:

https://your-gateway-host:3000/bluebubbles-webhook?password=your-password

安全说明:始终设置 webhook password,OpenClaw 会强制验证所有 Webhook 请求中的密码。

第四步:启动并配对

bash
openclaw gateway
openclaw pairing list bluebubbles
openclaw pairing approve bluebubbles CODE

访问控制配置

DM 访问

json
{
  "channels": {
    "bluebubbles": {
      "dmPolicy": "pairing",
      "allowFrom": ["+8613800138000", "someone@example.com"]
    }
  }
}

allowFrom 接受手机号(E.164 格式)或 Apple ID 邮箱。

群组访问

json
{
  "channels": {
    "bluebubbles": {
      "groupPolicy": "allowlist",
      "groupAllowFrom": ["+8613800138000"]
    }
  }
}

@提及限制

json
{
  "channels": {
    "bluebubbles": {
      "groups": {
        "*": { "requireMention": true }
      }
    }
  }
}

高级功能

打字指示和已读回执

json
{
  "channels": {
    "bluebubbles": {
      "typingIndicators": true,
      "readReceipts": true
    }
  }
}

流式消息分块

json
{
  "channels": {
    "bluebubbles": {
      "streaming": {
        "blockStreaming": false,
        "chunkMinBytes": 100
      }
    }
  }
}

保持 Messages.app 活跃(VM/无头服务器)

在 VM 或无头 macOS 服务器上,Messages.app 可能进入「空闲」状态导致消息停止接收。用 AppleScript + LaunchAgent 每 5 分钟触碰一次:

第一步:创建 ~/Scripts/poke-messages.scpt

applescript
try
  tell application "Messages"
    if not running then
      launch
    end if
    set _chatCount to (count of chats)
  end tell
on error
end try

第二步:创建 LaunchAgent ~/Library/LaunchAgents/com.user.poke-messages.plist 设置每 5 分钟(300 秒)运行一次上面的脚本。

常见问题

Webhook 收不到消息? 检查密码是否正确,URL 中的 ?password= 参数要与 OpenClaw 配置中的 password 一致。

macOS Tahoe 上编辑消息无效? 这是已知问题,BlueBubbles 在 Tahoe 上部分功能受限,团队正在修复中。

群组图标更新不生效? 在 Tahoe 上 API 调用返回成功,但图标可能不同步——这是 Tahoe 的兼容性问题。


原文:BlueBubbles - OpenClaw | 来源:OpenClaw 官方文档

相关文章推荐

教程OpenClaw + BlueBubbles:macOS iMessage AI 助手最佳方案完全指南OpenClaw 通过 BlueBubbles 接入 iMessage 的完整教程:为什么 BlueBubbles 是目前 iMessage 自动化的最佳方案(相比旧版 imsg CLI 的优势:支持消息编辑/撤回/Tapbacks/群组管理/稳定 REST API)、BlueBubbles macOS 服务器安装与配置、获取 Server URL 和密码、OpenClaw 最简配置(baseUrl + password)、DM 与群组访问控制、@ 提及触发、命令前缀触发、打字状态与已读回执、媒体消息处理,以及 macOS 26 Tahoe 上的已知限制。2026/3/23教程OpenClaw iMessage 接入指南:imsg CLI 配置、macOS 权限与 Tailscale 远程部署OpenClaw iMessage 接入教程:imsg CLI 安装与配置、macOS 完全磁盘访问和自动化权限配置、本地/SSH/Tailscale 三种部署模式、专用 Bot macOS 用户隔离方案、访问控制策略、附件 SCP 抓取与故障排查。2026/3/12教程OpenClaw Canvas 深度指南:让 AI 助手在你眼前渲染可视化内容OpenClaw Canvas 功能完整使用指南:Canvas 是什么(AI 控制的浏览器渲染层)、macOS App 中 Canvas 的开启方式、支持的内容类型(HTML/React 组件/图表/交互式 UI)、通过 SOUL.md 指导 AI 主动使用 Canvas、Canvas 与普通文字回复的使用场景区分、a2ui(自然语言驱动 UI)功能介绍,以及 Canvas 在数据可视化和原型设计中的实战案例。2026/3/18教程OpenClaw macOS 菜单栏 App 完全指南:菜单栏图标、语音唤醒与本地能力OpenClaw macOS 原生应用完整介绍:菜单栏 App 的功能与工作原理(Gateway 管理/权限申请/系统通知)、本地模式 vs 远程模式的区别、LaunchAgent 管理命令、macOS 专属能力(Canvas 画布/截图/摄像头/系统自动化)、语音唤醒配置与使用、Peekaboo Bridge UI 自动化、以及 macOS App 的安装与首次设置流程。2026/3/18教程OpenClaw Google Chat 接入指南:Service Account 配置、Webhook 公网暴露与空间访问控制OpenClaw Google Chat 接入完整教程:8 步配置流程(Cloud 项目/Service Account/JSON Key/Chat 应用创建)、三种公网暴露方式(Tailscale Funnel/Caddy/Cloudflare Tunnel)、Bearer Token 验证机制、DM 与 Space 访问控制、空间特定系统提示,以及故障排查。2026/3/12教程OpenClaw Google Chat 接入指南:Service Account 配置、Webhook 公网暴露与空间访问控制OpenClaw Google Chat 接入完整教程:8 步配置流程(Cloud 项目/Service Account/JSON Key/Chat 应用创建)、三种公网暴露方式(Tailscale Funnel/Caddy/Cloudflare Tunnel)、Bearer Token 验证机制、DM 与 Space 访问控制、空间特定系统提示,以及故障排查。2026/3/12