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:Installing imsg
Using Homebrew
From Source
Verify Installation
Granting Permissions
Grant Full Disk Access
iMessage integration requires access to the Messages database.
- Open System Settings → Privacy & Security → Full Disk Access
- Click the + button
- Add:
- Terminal.app (if running OpenClaw from Terminal)
- OpenClaw.app (if using the Mac app)
- Restart Terminal/OpenClaw after granting access
Grant Automation Access
AppleScript automation requires explicit permission.
- Open System Settings → Privacy & Security → Automation
- Find Terminal or OpenClaw in the list
- Enable Messages.app
Configuration
Basic Setup
Configure iMessage inopenclaw.config.json:
| Key | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable iMessage channel |
cliPath | string | "imsg" | Path to imsg binary |
dbPath | string | Auto-detected | Path to Messages database (usually ~/Library/Messages/chat.db) |
dmPolicy | string | "pairing" | DM access policy: pairing, allowlist, open, disabled |
allowFrom | string[] | [] | Allowed handles (phone numbers, emails, or chat IDs) |
DM Policies
pairing(recommended): Unknown senders get a pairing code; approve withopenclaw pairing approve imessage <handle>allowlist: Only handles inallowFromcan messageopen: Anyone can message (setallowFrom: ["*"])disabled: Ignore all iMessages
AllowFrom Formats
iMessage supports several identifier formats: Phone numbers (E.164 format):Group Chat Configuration
iMessage group chats are identified by a chat ID or GUID. To configure per-group settings:Listing Chats
To see available chats:- 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
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
Full Disk Access denied
Full Disk Access denied
Without Full Disk Access, OpenClaw cannot read the Messages database.If this shows “Operation not permitted”, access is not granted.
- Open System Settings → Privacy & Security → Full Disk Access
- Add Terminal.app or OpenClaw.app
- Restart the application after granting access
Cannot send messages
Cannot send messages
This usually means Automation permission is missing.
- Try sending a message manually - you should see a permission prompt
- If no prompt appears:
- Open System Settings → Privacy & Security → Automation
- Find Terminal or OpenClaw
- Enable Messages.app
- Restart OpenClaw
imsg not found
imsg not found
Ensure imsg is installed and in your PATH:If not found:
- Install via Homebrew:
brew install imsg - Or specify full path in config:
Messages not being received
Messages not being received
Check these:Verify database access:
- Messages.app is running and signed in
- Sender is in allowFrom (if using allowlist policy)
- Database polling is working
Database locked error
Database locked error
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
Group chats not working
Group chats not working
Group chats require:Add the chat ID to your config.
- All participants using iMessage (blue bubbles)
- Correct chat ID in configuration
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:"iMessage"(default) - iMessage only (blue bubbles)"SMS"- SMS/MMS (green bubbles, requires iPhone)
Polling Interval
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

