How to Connect Openclaw to WhatsApp: Step-by-Step Guide

Quick Start
Connecting Openclaw to WhatsApp lets you interact with your AI assistant directly through WhatsApp messages. This integration supports both direct messages and group chats with granular access controls.
If you are new to Openclaw channel integrations, you might also want to read about Signal integration for another secure messaging option.
Configure Openclaw
Open your ~/.openclaw/openclaw.json configuration file and add the WhatsApp channel settings. You can define access policies to control who is allowed to message the bot:
{ "channels": { "whatsapp": { "dmPolicy": "pairing", "allowFrom": ["+15551234567"], "groupPolicy": "allowlist", "groupAllowFrom": ["+15551234567"] } } }
Replace +15551234567 with your actual E.164 formatted phone number. For more deployment options, check out our guide on VPS Deployment.
Access Policy Options
DM Policy Settings
- pairing — Only paired/allowed numbers can message
- open — Anyone can send direct messages
- closed — DMs disabled entirely
Group Policy Settings
- allowlist — Only allowed numbers can add bot to groups
- open — Anyone can add bot to groups
- closed — Group participation disabled
Step-by-Step Setup
- Edit config: Open ~/.openclaw/openclaw.json in your preferred editor
- Add WhatsApp section: Copy the configuration block above into the channels object
- Set your phone: Replace the example number with your real E.164 phone number
- Choose policies: Set dmPolicy and groupPolicy based on your security needs
- Restart Openclaw: Apply changes by restarting the gateway
Best Practices & Troubleshooting
- E.164 format required: Always include the + and country code (e.g., +14155552671)
- Multiple numbers: Add multiple entries to allowFrom arrays for team access
- Security first: Start with pairing and allowlist policies, then open up if needed
- Test DMs first: Verify direct messaging works before testing group functionality
- Check logs: If messages are not received, review Openclaw gateway logs for connection errors
The WhatsApp integration works seamlessly with Openclaw's AI capabilities, bringing your assistant to the world's most popular messaging platform.