Skip to main content
iMessage integration on macOS allows OpenClaw to send and receive messages through Apple’s Messages app. This requires system-level access to the Messages database and AppleScript automation.
macOS only - iMessage integration is only available on macOS. It requires Full Disk Access permissions and cannot be sandboxed.

Prerequisites

  • macOS 10.15 (Catalina) or later
  • Messages.app configured with iMessage
  • imsg CLI tool (optional but recommended)
  • Full Disk Access for Terminal/OpenClaw

Quick Start

The interactive onboarding can guide you through iMessage setup:
Select iMessage and follow the prompts.

Installing imsg

Using Homebrew

From Source

Verify Installation

Granting Permissions

1

Grant Full Disk Access

iMessage integration requires access to the Messages database.
  1. Open System SettingsPrivacy & SecurityFull Disk Access
  2. Click the + button
  3. Add:
    • Terminal.app (if running OpenClaw from Terminal)
    • OpenClaw.app (if using the Mac app)
  4. Restart Terminal/OpenClaw after granting access
2

Grant Automation Access

AppleScript automation requires explicit permission.
  1. Open System SettingsPrivacy & SecurityAutomation
  2. Find Terminal or OpenClaw in the list
  3. Enable Messages.app
You may be prompted to grant access the first time OpenClaw tries to send a message.
3

Verify Messages.app is signed in

Open Messages.app and ensure you’re signed in with your Apple ID. Send a test message to verify iMessage is working.

Configuration

Basic Setup

Configure iMessage in openclaw.config.json:

DM Policies

  • pairing (recommended): Unknown senders get a pairing code; approve with openclaw pairing approve imessage <handle>
  • allowlist: Only handles in allowFrom can message
  • open: Anyone can message (set allowFrom: ["*"])
  • disabled: Ignore all iMessages

AllowFrom Formats

iMessage supports several identifier formats: Phone numbers (E.164 format):
Email addresses:
Chat identifiers:

Group Chat Configuration

iMessage group chats are identified by a chat ID or GUID. To configure per-group settings:
Get chat IDs with:

Listing Chats

To see available chats:
Output includes:
  • Chat ID
  • Display name (for group chats)
  • Participants
  • Last message date

Media Handling

iMessage supports:
  • Images (JPEG, PNG, HEIC)
  • Videos (MOV, MP4)
  • Audio files
  • Voice memos
  • Files and documents
Media attachments are automatically downloaded and processed.

Reactions

iMessage supports “Tapback” reactions:
  • ❤️ Love
  • 👍 Thumbs Up
  • 👎 Thumbs Down
  • 😂 Laugh
  • !! Emphasize
  • ?? Question

Multi-Account Support

You can configure multiple iMessage accounts (rare, but supported):

Troubleshooting

Without Full Disk Access, OpenClaw cannot read the Messages database.
  1. Open System SettingsPrivacy & SecurityFull Disk Access
  2. Add Terminal.app or OpenClaw.app
  3. Restart the application after granting access
Verify access:
If this shows “Operation not permitted”, access is not granted.
This usually means Automation permission is missing.
  1. Try sending a message manually - you should see a permission prompt
  2. If no prompt appears:
    • Open System SettingsPrivacy & SecurityAutomation
    • Find Terminal or OpenClaw
    • Enable Messages.app
  3. Restart OpenClaw
Test with imsg:
Ensure imsg is installed and in your PATH:
If not found:
  1. Install via Homebrew: brew install imsg
  2. Or specify full path in config:
Check these:
  1. Messages.app is running and signed in
  2. Sender is in allowFrom (if using allowlist policy)
  3. Database polling is working
Check logs:
Verify database access:
The Messages database can only be accessed by one process at a time.
  • Close Messages.app preferences if open
  • Ensure no other tools are accessing the database
  • Restart Messages.app
If persistent, restart macOS.
Group chats require:
  1. All participants using iMessage (blue bubbles)
  2. Correct chat ID in configuration
List group chats:
Add the chat ID to your config.

Limitations

  • macOS only - Cannot run on Linux or Windows
  • Requires Messages.app - Must be running and signed in
  • SMS limitations - SMS (green bubbles) may have limited features
  • Polling-based - Message delivery is not instant (typically 1-5 seconds)
  • No read receipts - Cannot detect when messages are read
  • Sandbox incompatible - Cannot run in a sandboxed environment

Advanced Configuration

Custom Database Path

Service Type

iMessage supports both iMessage and SMS:
Options:
  • "iMessage" (default) - iMessage only (blue bubbles)
  • "SMS" - SMS/MMS (green bubbles, requires iPhone)

Polling Interval

Interval in milliseconds (default: 2000 = 2 seconds).

Security Considerations

  • Full Disk Access is required - this grants broad system access
  • Messages database contains all your iMessage history
  • Automation access allows sending messages on your behalf
  • Use allowlist mode to restrict who can access your bot
  • Backup your database regularly (it’s in ~/Library/Messages/)

Next Steps

Pairing Guide

Learn about pairing codes and approvals

WhatsApp Setup

Set up WhatsApp as another channel

Configuration Reference

Full configuration options

Multi-Channel

Using multiple channels together