Connect OpenClaw to WhatsApp in under 10 minutes using QR code pairing. This guide covers OpenClaw v2026.2+, Node.js 22+ requirements, Baileys library integration, and security best practices for self-hosted AI assistants.
WhatsApp Integration
Connect OpenClaw to WhatsApp and have your AI assistant respond to messages instantly.
TL;DR
- ✓ Prerequisites: Node.js 22+, OpenClaw installed
- ✓ Configuration: Add WhatsApp section to openclaw.json
- ✓ Time: ~10 minutes
- ✓ Pairing: QR code authentication
Prerequisites
- 1.
OpenClaw installed
Follow the installation guide if you haven't already.
- 2.
WhatsApp account
You'll need an active WhatsApp account for pairing.
- 3.
Mobile device with WhatsApp
Required for QR code scanning during setup.
Setup Steps
Step 1: Configure openclaw.json
Add the WhatsApp configuration to your openclaw.json file:
{
"channels": {
"whatsapp": {
"enabled": true,
"allowFrom": ["*"]
}
}
} Step 2: Start OpenClaw
Start OpenClaw with WhatsApp enabled:
openclaw start You'll see a QR code in the console. Scan it with your WhatsApp mobile app.
Step 3: Pair with QR Code
Open WhatsApp on your phone and go to:
- Settings → Linked Devices
- Tap "Link a Device"
- Scan the QR code from the console
🎉 Connected! Your WhatsApp AI assistant is now ready.
Advanced Configuration
Allow Specific Senders
Restrict who can interact with your AI assistant:
{
"channels": {
"whatsapp": {
"enabled": true,
"allowFrom": ["+1234567890", "+0987654321"]
}
}
} Troubleshooting
QR code not scanning?
Make sure your phone's screen brightness is at maximum and the QR code is fully visible in the console.
Session disconnected?
Restart OpenClaw and re-scan the QR code. WhatsApp sessions may expire after some time.
Messages not being received?
Check that your openclaw.json has "enabled": true for the WhatsApp channel.
Related Guides
Frequently Asked Questions
Does OpenClaw work with WhatsApp Business?
Yes, OpenClaw works with both WhatsApp Personal and WhatsApp Business accounts. The setup process is identical for both account types.
How long does WhatsApp pairing last?
WhatsApp sessions typically last 30 days before requiring re-authentication. However, OpenClaw will notify you when the session is about to expire.
Can I use WhatsApp Web while using OpenClaw?
No, you cannot use WhatsApp Web simultaneously with OpenClaw. However, OpenClaw on mobile works independently - you can continue using WhatsApp on your phone normally.
Is WhatsApp conversation data stored locally?
Yes, all WhatsApp conversations processed by OpenClaw stay on your local server. No message data is sent to third-party servers unless you explicitly configure cloud logging.