Skip to main content
RapidDev - Software Development Agency
openclaw-integrationsDirect API Integration

How to Connect Bluebubbles to OpenClaw

To connect BlueBubbles to OpenClaw, set up a BlueBubbles server on a Mac (required), store your BLUEBUBBLES_URL and BLUEBUBBLES_PASSWORD in OpenClaw's config, and configure OpenClaw to route iMessage-related commands to the BlueBubbles REST API. This is a direct API integration — it uses the BlueBubbles HTTP server rather than a ClawHub skill. Once configured, OpenClaw can send and receive iMessages through your Mac from any device or platform.

What you'll learn

  • How to install and configure BlueBubbles server on a Mac to expose the iMessage API
  • How to find your BlueBubbles server URL and password for API authentication
  • How to configure OpenClaw with BLUEBUBBLES_URL and BLUEBUBBLES_PASSWORD credentials
  • How to send and receive iMessages through OpenClaw using the BlueBubbles REST API
  • How to troubleshoot connection issues between OpenClaw and the BlueBubbles server
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate13 min read30 minutesMessagingMarch 2026RapidDev Engineering Team
TL;DR

To connect BlueBubbles to OpenClaw, set up a BlueBubbles server on a Mac (required), store your BLUEBUBBLES_URL and BLUEBUBBLES_PASSWORD in OpenClaw's config, and configure OpenClaw to route iMessage-related commands to the BlueBubbles REST API. This is a direct API integration — it uses the BlueBubbles HTTP server rather than a ClawHub skill. Once configured, OpenClaw can send and receive iMessages through your Mac from any device or platform.

Why Connect BlueBubbles to OpenClaw?

iMessage is Apple's proprietary messaging system — it only runs natively on Apple hardware. If you want to send or receive iMessages from a Windows PC, Linux server, Android device, or any non-Apple platform, you need a bridge. BlueBubbles is the most widely used open-source solution for this: it runs a REST API server on a Mac, and any device on your network (or the internet, if you expose it) can send and receive iMessages through HTTP calls to that server.

Connecting BlueBubbles to OpenClaw gives your AI agent the ability to interact with iMessage conversations. This is valuable for building automated messaging workflows, customer support tools that need iMessage coverage, personal automation (send yourself reminders via iMessage from your AI agent), or multi-platform messaging dashboards where iMessage is one of several channels alongside Telegram, Discord, and WhatsApp.

This integration is Intermediate difficulty because it requires a permanently running Mac with BlueBubbles installed — this is a hard dependency. If you do not have an always-on Mac (a Mac mini works well for this), this integration is not feasible. For simpler cross-platform messaging, consider the Telegram skill, which has no hardware prerequisites. The BlueBubbles integration is specifically for teams and individuals who need genuine iMessage coverage and have the hardware to support it.

Integration method

Direct API Integration

BlueBubbles runs as a server application on a Mac and exposes iMessage functionality through a local HTTP REST API. The OpenClaw integration connects to this server using your BlueBubbles server URL and password, routing iMessage send/receive commands through direct HTTP calls. Unlike ClawHub skills, this integration requires a running BlueBubbles server as a prerequisite — OpenClaw communicates with your Mac over your local network or through a public URL if you expose the server externally.

Prerequisites

  • A Mac (Mac mini, MacBook, or iMac) that stays powered on and connected to the internet — this is a hard requirement for iMessage access
  • BlueBubbles server installed on that Mac (free download at bluebubbles.app)
  • An Apple ID logged in on the Mac with iMessage enabled in Messages app
  • OpenClaw installed on the device you want to use for commands (can be a different machine from the Mac running BlueBubbles)
  • Basic familiarity with REST APIs and HTTP requests

Step-by-step guide

1

Install and Configure BlueBubbles Server on Your Mac

Download BlueBubbles from bluebubbles.app and install it on your Mac. Open the app — it guides you through initial setup with a wizard. The key steps are: 1. Sign in to iCloud in the BlueBubbles setup (it uses your Apple ID to access iMessage) 2. Set a server password — this is your BLUEBUBBLES_PASSWORD credential. Choose something strong but memorable, as you will enter it in OpenClaw's config. 3. Enable the HTTP server. BlueBubbles runs a local HTTP server on port 1234 by default. Note the local IP address shown in the server settings — this becomes your BLUEBUBBLES_URL. 4. Optionally, enable 'ngrok' or 'Cloudflare Tunnel' in BlueBubbles settings if you want to access the server from outside your local network. BlueBubbles has a built-in ngrok integration that generates a public URL automatically. Verify the server is running by opening a browser on the same Mac and navigating to `http://localhost:1234/api/v1/server/info` with your password as a query parameter. You should see a JSON response with server information. Leave BlueBubbles running in the background. On a Mac mini used as a home server, configure it to launch at login: System Settings > General > Login Items > add BlueBubbles.

terminal
1# Test your BlueBubbles server is running (run in Terminal on the Mac)
2curl "http://localhost:1234/api/v1/server/info?password=YOUR_PASSWORD"
3
4# Expected response:
5# {"status": 200, "message": "Successfully got server info", "data": {...}}
6
7# Find your Mac's local IP address
8ifconfig | grep 'inet ' | grep -v 127.0.0.1
9# Note the IP (e.g., 192.168.1.50) this is your BLUEBUBBLES_URL base

Pro tip: For access outside your home network, use the ngrok integration built into BlueBubbles (Settings > Connection > ngrok). BlueBubbles will show a public URL like `https://abc123.ngrok.io` that you can use as BLUEBUBBLES_URL from anywhere.

Expected result: BlueBubbles server is running, the test curl command returns server info JSON, and you have your server URL and password ready.

2

Configure BLUEBUBBLES_URL and BLUEBUBBLES_PASSWORD in OpenClaw

Open the OpenClaw config file at `~/.openclaw/config.yaml` and add the BlueBubbles integration configuration. Unlike ClawHub skills, direct API integrations are configured under the `integrations` key rather than `skills`. The `url` field should be the base URL of your BlueBubbles server — either `http://YOUR_MAC_IP:1234` for local network access, or the ngrok/Cloudflare public URL if you need access from outside your network. Do not include a trailing slash. The `password` field is the server password you set during BlueBubbles setup. This is sent as a query parameter on every API request. After saving the config, run `clawhub reload` to apply the changes. OpenClaw will attempt to contact the BlueBubbles server on the next relevant command — you will see a connection confirmation in the OpenClaw log.

~/.openclaw/config.yaml
1# ~/.openclaw/config.yaml
2integrations:
3 bluebubbles:
4 url: "http://192.168.1.50:1234" # Your BlueBubbles server URL
5 # OR for ngrok: url: "https://abc123.ngrok.io"
6 password: "YOUR_BLUEBUBBLES_PASSWORD"
7 poll_interval: 30 # Seconds between inbox checks (default: 60)
8 auto_read: true # Mark messages as read after fetching (default: false)
9 send_typing_indicator: false # Show typing indicator when composing (default: false)

Pro tip: If your Mac's local IP address changes (common with DHCP routers), set a static IP in System Settings > Network > Wi-Fi > Details > TCP/IP > Configure IP > Manual. This prevents you from needing to update BLUEBUBBLES_URL when the IP changes.

Expected result: The config file is saved with your BlueBubbles URL and password. Running `clawhub reload` shows no config errors.

3

Test the Connection by Sending a Test iMessage

With the config in place, test the connection by using OpenClaw's direct integration commands to send a test message. Because BlueBubbles is a direct API integration (not a ClawHub skill), you trigger it differently from skill-based integrations — you configure OpenClaw to make HTTP calls to the BlueBubbles endpoints directly. The BlueBubbles REST API uses a consistent endpoint pattern. To send a message, POST to `/api/v1/message/text` with the recipient's phone number and message text in the request body. The password is sent as a query parameter on all requests. Test by sending yourself a message first. Use your own iPhone number in international format (e.g., +15550001234). If the message appears on your iPhone, the integration is working correctly. OpenClaw can also call this endpoint through its HTTP integration features or through a configured automation script. The examples below show both the raw curl command for testing and the OpenClaw config approach for automation.

terminal
1# Test sending an iMessage via BlueBubbles API (run in terminal)
2curl -X POST "http://192.168.1.50:1234/api/v1/message/text?password=YOUR_PASSWORD" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "chatGuid": "iMessage;-;+15550001234",
6 "message": "Test message from OpenClaw via BlueBubbles",
7 "method": "apple-script"
8 }'
9
10# Test reading recent messages
11curl "http://192.168.1.50:1234/api/v1/chat?password=YOUR_PASSWORD&limit=10"
12
13# Check server status
14curl "http://192.168.1.50:1234/api/v1/server/info?password=YOUR_PASSWORD"

Pro tip: The `chatGuid` format for iMessage is always `iMessage;-;+[phone number in E.164 format]`. For group chats, the GUID looks different — use the BlueBubbles `/api/v1/chat` endpoint to list existing chats and get their GUIDs.

Expected result: The test message appears on your iPhone as an iMessage, and the API returns a 200 response confirming the message was sent.

4

Configure Incoming Message Polling

BlueBubbles can notify OpenClaw of incoming messages in two ways: polling (OpenClaw periodically asks the server for new messages) or webhooks (BlueBubbles pushes new messages to OpenClaw). Polling is simpler to set up; webhooks are more real-time but require OpenClaw to be accessible from the BlueBubbles server. For the polling approach, set `poll_interval` in your config (shown in Step 2). OpenClaw will query `/api/v1/message?sort=DESC&limit=10` at that interval and process any messages newer than the last-seen timestamp. For webhook-based delivery, go to BlueBubbles Settings > Notifications > Webhooks and add your OpenClaw webhook URL. BlueBubbles will POST new message payloads to that URL in real time. This requires OpenClaw to have an accessible HTTP endpoint, which is available in OpenClaw Server mode. For most personal and small-team use cases, polling every 30-60 seconds is sufficient and simpler to maintain. RapidDev's team recommends starting with polling and switching to webhooks only if real-time response is a firm requirement for your use case.

bluebubbles-webhook.json
1# BlueBubbles webhook payload format (POST to your OpenClaw webhook endpoint)
2# BlueBubbles sends this when a new message arrives:
3{
4 "type": "new-message",
5 "data": {
6 "guid": "message-guid-here",
7 "text": "Message content here",
8 "handle": {
9 "address": "+15550001234"
10 },
11 "dateCreated": 1709123456789,
12 "isFromMe": false,
13 "chat": {
14 "guid": "iMessage;-;+15550001234",
15 "displayName": null
16 }
17 }
18}
19
20# Poll for new messages manually (useful for testing):
21curl "http://192.168.1.50:1234/api/v1/message?password=YOUR_PASSWORD&sort=DESC&limit=5"

Pro tip: Set `auto_read: true` in your OpenClaw config to mark messages as read on your Mac when OpenClaw fetches them — this prevents your Mac's Messages app from showing unread counts for messages OpenClaw has already processed.

Expected result: OpenClaw polls for new messages at your configured interval and processes incoming iMessages for automation workflows.

5

Build a Simple Automated Response Workflow

With send and receive working, you can build automated response workflows. The pattern is: poll for new messages, filter by sender or keyword, compose a response using OpenClaw's AI, and send the response via the BlueBubbles API. This can be done through OpenClaw's workflow configuration, where you chain the BlueBubbles integration with OpenClaw's language processing capabilities. You configure trigger conditions (new message from a specific number, or message containing a keyword), an AI response generation step, and a send action. For more complex workflows — like routing messages to different response templates based on content, or escalating to a human after a number of AI responses — the OpenClaw workflow engine handles the logic. The config below shows a simple keyword-based auto-reply pattern as a starting point.

~/.openclaw/config.yaml
1# ~/.openclaw/config.yaml automated response workflow example
2workflows:
3 imessage-auto-reply:
4 trigger:
5 integration: bluebubbles
6 event: new-message
7 conditions:
8 - field: text
9 contains: ["help", "support", "question"]
10 actions:
11 - type: ai-response
12 prompt: "You received an iMessage asking for help. Reply politely that someone will be in touch within 2 hours."
13 - type: integration-call
14 integration: bluebubbles
15 endpoint: /api/v1/message/text
16 method: POST
17 body:
18 chatGuid: "{{trigger.chat.guid}}"
19 message: "{{ai-response.output}}"
20 method: apple-script

Pro tip: Test automated workflows with your own phone number before deploying to real contacts. Send yourself test messages and verify the auto-reply arrives correctly before widening the trigger conditions.

Expected result: OpenClaw automatically replies to incoming iMessages matching your trigger conditions via the BlueBubbles API.

Common use cases

Automated iMessage Notifications

Use OpenClaw to send iMessage notifications triggered by events — new orders, system alerts, or scheduled reminders — to iPhone contacts. This is useful for teams where the primary contact method is iMessage but your backend infrastructure runs on non-Apple servers.

OpenClaw Prompt

Build an OpenClaw config that sends an iMessage to +1-555-0100 via BlueBubbles when triggered with the message template 'Alert: {event_name} occurred at {time}'

Copy this prompt to try it in OpenClaw

Multi-Platform Messaging Dashboard

Consolidate iMessage alongside Telegram, Discord, and WhatsApp in a single OpenClaw conversation thread. OpenClaw reads incoming messages from all platforms and routes outgoing replies to the correct service based on where the original message came from.

OpenClaw Prompt

Set up OpenClaw to monitor my BlueBubbles iMessage inbox and summarize all unread messages from the past 24 hours

Copy this prompt to try it in OpenClaw

iMessage Customer Support Integration

Route incoming iMessages from customers to OpenClaw for triage and automated responses. OpenClaw can read the message content, determine intent, send an initial acknowledgment via BlueBubbles, and escalate to a human agent when needed — all through the BlueBubbles REST API.

OpenClaw Prompt

Configure OpenClaw to read new iMessages from BlueBubbles every 5 minutes and send an auto-reply to any message containing 'support' or 'help'

Copy this prompt to try it in OpenClaw

Troubleshooting

OpenClaw cannot connect to BlueBubbles — 'connection refused' or timeout error

Cause: The BlueBubbles server is not running on the Mac, the URL is wrong (wrong IP or port), or a firewall is blocking port 1234 between the two machines.

Solution: Open BlueBubbles on the Mac and confirm the server shows as running (green indicator in the app). Verify the IP address in your OpenClaw config matches your Mac's current IP (`ifconfig | grep inet`). If OpenClaw is on a different network, use the ngrok URL instead of the local IP.

typescript
1# Test connectivity from OpenClaw's machine
2curl "http://YOUR_BLUEBUBBLES_URL:1234/api/v1/server/info?password=YOUR_PASSWORD"
3
4# If that fails, check the Mac's firewall:
5# System Settings > Network > Firewall allow incoming connections for BlueBubbles

API returns 401 Unauthorized or 'Invalid password'

Cause: The BLUEBUBBLES_PASSWORD in OpenClaw's config does not match the password set in the BlueBubbles app settings.

Solution: Open BlueBubbles on the Mac, go to Settings > Server, and verify or reset the server password. Update the `password` field in `~/.openclaw/config.yaml` to match exactly. Passwords are case-sensitive.

typescript
1# Verify password by testing directly:
2curl "http://192.168.1.50:1234/api/v1/server/info?password=CORRECT_PASSWORD"
3# Returns 200 if password is correct, 401 if not

Messages send successfully via curl but are not delivered as iMessages (appear as SMS or fail)

Cause: iMessage delivery requires the recipient's Apple ID to be associated with the phone number, the Mac to be signed into iCloud with iMessage enabled, and the `method: apple-script` parameter in the send request.

Solution: Open Messages on the Mac and verify you can send iMessages manually to the recipient. Check that iMessage is enabled in System Settings > [Apple ID] > iMessage. Ensure you are using `method: apple-script` (not `method: http`) in the send API call, as the apple-script method is more reliable for iMessage delivery.

typescript
1# Use apple-script method for reliable iMessage delivery:
2curl -X POST "http://192.168.1.50:1234/api/v1/message/text?password=YOUR_PASSWORD" \
3 -H "Content-Type: application/json" \
4 -d '{"chatGuid": "iMessage;-;+15550001234", "message": "Test", "method": "apple-script"}'

BlueBubbles server URL changes after Mac restarts or network reconnects

Cause: The Mac is using DHCP and receives a different IP address on reconnect. The ngrok URL also changes on free ngrok accounts unless you have a static domain.

Solution: Set a static local IP on the Mac (System Settings > Network > Wi-Fi > Details > TCP/IP > Configure IP > Manual). For external access, use Cloudflare Tunnel (built into BlueBubbles settings) instead of ngrok — Cloudflare Tunnels have stable URLs on the free tier.

typescript
1# Use Cloudflare Tunnel for a stable public URL:
2# 1. In BlueBubbles: Settings > Connection > Cloudflare Tunnel
3# 2. Copy the generated URL (format: https://xxx.trycloudflare.com)
4# 3. Update ~/.openclaw/config.yaml:
5# url: "https://xxx.trycloudflare.com"

Best practices

  • Use a Mac mini as a dedicated BlueBubbles server — its low power consumption makes it practical to keep running 24/7, and its small footprint fits in a home office or server rack.
  • Set a static local IP on your Mac server to prevent BLUEBUBBLES_URL from changing when the router assigns a new DHCP lease — this is the single most common cause of connection failures after initial setup.
  • Use Cloudflare Tunnel (built into BlueBubbles) rather than ngrok for public URL access — Cloudflare Tunnels are stable on the free tier and do not change between restarts the way free ngrok URLs do.
  • Never expose the BlueBubbles API directly to the public internet without a strong password — the API provides full access to your iMessage account, including reading all conversations.
  • Test with your own phone number before connecting to customer-facing or production message threads — verify send and receive work correctly before routing real contacts through the integration.
  • Configure `poll_interval: 30` for near-real-time responsiveness in automation workflows — higher values (120+) are fine for non-urgent monitoring but will make your bot feel slow in conversational use cases.
  • Keep BlueBubbles updated to the latest version — Apple occasionally changes iMessage internals in macOS updates, and BlueBubbles releases patches to maintain compatibility within days of major macOS releases.

Alternatives

Frequently asked questions

How do I set up BlueBubbles OpenClaw integration?

Install BlueBubbles on a Mac, set a server password, and note the server URL. Add `url` and `password` under the `bluebubbles` integrations key in `~/.openclaw/config.yaml`. Test the connection with a curl command to the BlueBubbles info endpoint. Once connected, OpenClaw can send and receive iMessages through your Mac.

Do I need a Mac to use BlueBubbles with OpenClaw?

Yes — iMessage is Apple-only technology and BlueBubbles requires a Mac running macOS with iMessage enabled to function. There is no workaround for this hardware requirement. OpenClaw itself can run on any platform, but the BlueBubbles server component must run on a Mac.

What are the BLUEBUBBLES_URL and BLUEBUBBLES_PASSWORD credentials?

BLUEBUBBLES_URL is the HTTP address of your BlueBubbles server — either a local IP like `http://192.168.1.50:1234` or a public URL via ngrok or Cloudflare Tunnel. BLUEBUBBLES_PASSWORD is the server password you set in BlueBubbles settings during initial setup. Both are configured in `~/.openclaw/config.yaml` under the `integrations.bluebubbles` key.

Why is the OpenClaw BlueBubbles integration not working after a Mac restart?

The two most common causes are: BlueBubbles is not set to launch at login (fix: System Settings > General > Login Items > add BlueBubbles), or your Mac's local IP address changed on reconnect (fix: set a static IP in Network settings). If using ngrok, the public URL also changes on free accounts unless you have a paid ngrok plan or use Cloudflare Tunnel instead.

Can I use OpenClaw BlueBubbles integration to read iMessages, not just send them?

Yes — the BlueBubbles API supports both sending messages and reading your inbox. You can poll for new messages, search message history, and read specific conversations through the API. OpenClaw's polling configuration automatically fetches new messages at your configured interval and makes them available for processing in automation workflows.

Is the BlueBubbles OpenClaw integration secure?

The integration's security depends on your BlueBubbles setup. On a local network, traffic stays within your network and is not exposed to the internet. For remote access via ngrok or Cloudflare Tunnel, use a strong server password and consider restricting access by IP if possible. Never share your BLUEBUBBLES_PASSWORD publicly — it grants full access to read and send iMessages from your account. RapidDev recommends using Cloudflare Tunnel with a strong password for the best balance of accessibility and security.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.