OpenClaw WhatsApp Channel
Connect OpenClaw to WhatsApp using the Baileys protocol. This integration allows your AI assistant to send and receive messages on WhatsApp without requiring a business API — just scan a QR code with your phone and you're ready to go. A dedicated phone number is recommended for clean routing.
WhatsApp Supported Features
Text Messages
Supported
Media & Files
Supported
Reactions
Supported
Threads
Not Supported
Voice Messages
Supported
Group Chat
Supported
WhatsApp Prerequisites
- A dedicated phone number for WhatsApp (recommended, separate from personal)
- Node.js 18+ installed on your server (Bun is not recommended)
- OpenClaw Gateway running and configured
WhatsApp Quick Setup
Add WhatsApp channel config
Add the WhatsApp channel configuration to ~/.openclaw/openclaw.json. Set the dmPolicy (allowlist, pairing, or open) and allowFrom list to control who can message your assistant.
Run login command and scan QR code
Run 'openclaw channels login' in your terminal. A QR code will appear. Scan it with WhatsApp on your phone (Settings > Linked Devices > Link a Device). Credentials are saved to ~/.openclaw/credentials/whatsapp/.
Send a test message
Send a direct message to your WhatsApp number from another phone. If using allowlist policy, make sure the sender's number is in the allowFrom list. If using the default pairing policy, approve the sender via 'openclaw pairing approve whatsapp <code>'.
WhatsApp Configuration Example
{
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"allowFrom": ["+15551234567"]
}
}
}
WhatsApp Deep Dive
Architecture Overview
Phone Number Setup
{
"channels": {
"whatsapp": {
"accounts": {
"default": {
"phone": "+15551234567"
}
}
}
}
}
Login & Credentials
openclaw channels login whatsapp
DM Policies
{
"channels": {
"whatsapp": {
"dmPolicy": "pairing",
"allowFrom": ["+15551234567", "+15559876543"]
}
}
}
Group Chat Management
{
"channels": {
"whatsapp": {
"groupPolicy": "allowlist",
"groupActivation": "mention",
"groupAllowList": ["group-jid-1", "group-jid-2"]
}
}
}
Read Receipts
{
"channels": {
"whatsapp": {
"sendReadReceipts": true
}
}
}
Acknowledgment Reactions
{
"channels": {
"whatsapp": {
"ackReaction": {
"emoji": "👀",
"direct": true,
"group": true
}
}
}
}
Outbound Messaging & Media
Rate Limits & Sending Limits
{
"channels": {
"whatsapp": {
"textChunkLimit": 5,
"mediaMaxMb": 50
}
}
}
Why Not Twilio / WhatsApp Business API?
WhatsApp Configuration Reference
| Key | Type | Default | Description |
|---|---|---|---|
| dmPolicy | string | "pairing" | Controls who can DM the bot. Options: pairing, allowlist, open, disabled |
| selfChatMode | string | "disabled" | How to handle messages you send to yourself. Options: disabled, ai, note |
| allowFrom | string[] | [] | Phone numbers allowed to message the bot (when dmPolicy is allowlist) |
| sendReadReceipts | boolean | true | Whether to send blue-tick read receipts when processing messages |
| ackReaction.emoji | string | "👀" | Emoji used to react to messages as acknowledgment |
| ackReaction.direct | boolean | true | Send ack reaction in direct messages |
| ackReaction.group | boolean | true | Send ack reaction in group messages |
| textChunkLimit | number | 5 | Maximum number of text chunks per AI response |
| mediaMaxMb | number | 50 | Maximum inbound media file size in megabytes. Outbound limit is controlled by agents.defaults.mediaMaxMb (default 5 MB) |
| groupPolicy | string | "disabled" | Group chat policy. Options: disabled, allowlist, open |
| groupActivation | string | "mention" | How the bot is triggered in groups. Options: mention, always |
| historyLimit | number | 50 | Number of recent messages to include as AI context |
| chunkMode | string | "split" | How to handle long responses. Options: split, newline, truncate |
| messagePrefix | string | "" | Optional prefix added to all outgoing messages |
| accounts.<id>.* | object | {} | Per-account settings (phone, credentials path, overrides) |
Controls who can DM the bot. Options: pairing, allowlist, open, disabled
How to handle messages you send to yourself. Options: disabled, ai, note
Phone numbers allowed to message the bot (when dmPolicy is allowlist)
Whether to send blue-tick read receipts when processing messages
Emoji used to react to messages as acknowledgment
Send ack reaction in direct messages
Send ack reaction in group messages
Maximum number of text chunks per AI response
Maximum inbound media file size in megabytes. Outbound limit is controlled by agents.defaults.mediaMaxMb (default 5 MB)
Group chat policy. Options: disabled, allowlist, open
How the bot is triggered in groups. Options: mention, always
Number of recent messages to include as AI context
How to handle long responses. Options: split, newline, truncate
Optional prefix added to all outgoing messages
Per-account settings (phone, credentials path, overrides)
WhatsApp Frequently Asked Questions
WhatsApp Troubleshooting
The session credentials may have expired, or the phone's WhatsApp app was updated and invalidated the linked session.
This usually happens when the phone goes offline for extended periods, or when another linked device conflicts with the Gateway session.
Rate limiting, network issues, or the recipient has blocked your number.