Quick Start
The fastest way to set up WhatsApp is with the interactive onboarding:Manual Setup
Pair your device
Start the pairing process:A QR code will appear in your terminal. Scan it with WhatsApp on your phone:
- Open WhatsApp → Settings → Linked Devices
- Tap “Link a Device”
- Scan the QR code
Configure access policy
Set your DM policy and allowlist (see Configuration below).
Configuration
Basic Options
| Key | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable WhatsApp channel |
dmPolicy | string | "pairing" | DM access policy: pairing, allowlist, open, disabled |
allowFrom | string[] | [] | E.164 phone numbers allowed to message (e.g., ["+15555550123"]) |
selfChatMode | boolean | false | Allow messages from your own number (personal phone mode) |
DM Policies
pairing(recommended): Unknown senders get a pairing code; you approve them withopenclaw pairing approveallowlist: Only numbers inallowFromcan message; others are blockedopen: Anyone can message (setallowFrom: ["*"])disabled: Ignore all WhatsApp DMs
Self-Chat Mode
If you’re using your personal WhatsApp number with OpenClaw, enableselfChatMode to allow messages from yourself:
Group Configuration
WhatsApp groups work automatically once you’re paired. The bot responds when:- You send a message in a group where the bot is a member
- The message is a reply to one of the bot’s messages
- The message mentions the bot (if mention gating is enabled)
Multi-Account Support
You can connect multiple WhatsApp numbers:Media Handling
WhatsApp supports sending and receiving:- Images (JPEG, PNG, WebP)
- Videos (MP4)
- Audio (MP3, OGG, AAC)
- Documents (PDF, DOCX, etc.)
- Voice messages
- Stickers
Reactions
WhatsApp supports emoji reactions. OpenClaw can send reactions in response to messages:Environment Variables
No environment variables are required for WhatsApp. Credentials are stored in theauthDir (default: ~/.openclaw/auth/whatsapp/).
Troubleshooting
QR code doesn't appear
QR code doesn't appear
Ensure the If still not working, check logs:
web section is enabled in your config:QR code expired before scanning
QR code expired before scanning
The QR code expires after 60 seconds. Run
openclaw channels login whatsapp again to generate a new one.Connection keeps dropping
Connection keeps dropping
WhatsApp may disconnect if:
- The primary phone loses internet
- WhatsApp is uninstalled from the phone
- Linked device limit is reached (WhatsApp allows 4 linked devices)
openclaw channels login whatsapp.Messages not being received
Messages not being received
Check your Verify status:
dmPolicy and allowFrom configuration. If using allowlist, ensure the sender’s number is included:Groups not working
Groups not working
Ensure the bot is a member of the group. You must manually add the bot’s phone number to the group from WhatsApp.Check group configuration:
Credentials lost after restart
Credentials lost after restart
Credentials are stored in
~/.openclaw/auth/whatsapp/creds.json. Ensure this file is not being deleted and has proper permissions.Backup your credentials:Security Considerations
- Pairing credentials are stored locally in
~/.openclaw/auth/whatsapp/ - Backup credentials regularly if you don’t want to re-pair
- Use allowlist mode if you only want specific contacts to access your bot
- Enable selfChatMode only if you’re using your personal phone number
- Group access is controlled per-group via the
groupsconfiguration
Next Steps
Pairing Guide
Learn more about pairing codes and approvals
Configuration Reference
Full configuration options
Telegram Setup
Set up Telegram as another channel
Multi-Channel
Using multiple channels together

