OpenClaw WhatsApp Setup: Talk to Your AI from Your Phone
Want to talk to your AI assistant from your phone โ anywhere, anytime? With OpenClaw and WhatsApp, you can. No app to install, no web dashboard to check. Just open WhatsApp, type a message, and your AI responds instantly.
This guide walks you through the complete OpenClaw WhatsApp setup using the Baileys provider. By the end, you will have a working WhatsApp connection to your self-hosted AI assistant. The whole process takes about 15โ20 minutes if you already have OpenClaw installed.
New to OpenClaw? Read our complete guide to what OpenClaw is before continuing. If you need help getting OpenClaw installed first, check out our professional setup service.
Why WhatsApp?
WhatsApp is the most popular messaging app in the world with over 2 billion users. Connecting your AI assistant to WhatsApp means you can interact with it from your phone, tablet, or WhatsApp Web on your computer โ without logging into a separate dashboard or terminal.
Here is why WhatsApp is a great channel for OpenClaw:
- Always with you. Your phone is always in your pocket. Send your AI a task while waiting in line, commuting, or lying in bed.
- No extra apps. You already use WhatsApp. No new software to learn.
- Rich messages. Send and receive images, documents, voice notes, and links โ not just plain text.
- Multi-device. WhatsApp works on your phone and computer simultaneously. Access your AI from wherever you are.
Already set up Telegram? Check our Telegram integration guide โ you can run both channels at once.
Prerequisites
Before you start, make sure you have:
- A running OpenClaw instance. This can be on a VPS, a Mac Mini, or any server. If you do not have OpenClaw installed yet, our setup service can get you running in under 30 minutes.
- Node.js 18 or higher installed on your server. Baileys requires a modern Node.js runtime.
- A dedicated phone number for WhatsApp. We strongly recommend using a separate number โ not your personal WhatsApp. A prepaid SIM card, Google Voice number, or any number that can receive an SMS verification code works.
- WhatsApp installed on your phone and registered with the dedicated number. You will need it to scan a QR code during setup.
- SSH access to your server (or direct terminal access if running locally).
What is the Baileys Provider?
OpenClaw connects to WhatsApp through the Baileys provider. Baileys is an open-source library that implements the WhatsApp Web protocol in Node.js. It is not the official WhatsApp Business API โ it is a community-built, reverse-engineered implementation.
What this means for you:
- Free. No per-message fees. No Meta Business verification. No monthly costs beyond your server.
- Works with personal accounts. You do not need a WhatsApp Business account.
- Full message support. Text, images, documents, reactions, and more.
- Open source. The code is publicly auditable on GitHub.
The trade-off is that Baileys is unofficial. WhatsApp could theoretically block accounts using it, though this is rare for personal-use scenarios. We cover risk mitigation in the troubleshooting section below.
Step 1: Configure the WhatsApp Channel
Open your OpenClaw configuration file. This is typically openclaw.json in your OpenClaw directory, or ~/.openclaw/openclaw.json depending on your setup.
Add or update the channels section to include the WhatsApp provider:
{
"channels": {
"whatsapp": {
"provider": "baileys",
"enabled": true,
"autoReply": true,
"allowedNumbers": [
"1234567890@s.whatsapp.net"
]
}
}
}Here is what each field does:
"provider": "baileys"โ Tells OpenClaw to use the Baileys library for WhatsApp connectivity."enabled": trueโ Activates the WhatsApp channel."autoReply": trueโ The AI automatically responds to incoming messages. Set tofalseif you want manual control."allowedNumbers"โ A whitelist of phone numbers that can interact with your AI. Use the formatcountrycode+number@s.whatsapp.net. This prevents random people from chatting with your assistant.
Step 2: Start the Gateway
With the configuration saved, start (or restart) the OpenClaw gateway:
openclaw gateway restartWatch the terminal output. Within a few seconds, you should see a QR code printed directly in your terminal. This is the WhatsApp Web pairing code.
If you are connected via SSH and the QR code looks garbled, try making your terminal window wider (at least 80 columns) or use a terminal that supports Unicode block characters.
Step 3: Scan the QR Code
Now grab your phone:
- Open WhatsApp on the phone registered with your dedicated number.
- Go to Settings โ Linked Devices โ Link a Device.
- Point your phone camera at the QR code displayed in the terminal.
- Wait a few seconds. The terminal should show a "connected" or "pairing successful" message.
That is it โ your OpenClaw instance is now connected to WhatsApp. The session persists across gateway restarts, so you should not need to scan the QR code again unless you manually unlink the device or the session expires (which typically takes weeks or months).
Step 4: Test the Connection
Send a test message to your dedicated WhatsApp number from a different phone or WhatsApp account. Try something simple:
Hey, are you there?If everything is configured correctly, your AI should respond within a few seconds. You can also check the OpenClaw gateway logs to see the incoming message and outgoing response:
openclaw gateway logsYou should see entries showing the received WhatsApp message and the AI generating a reply.
Step 5: Fine-Tune Your Setup
Now that the basic connection works, here are some optional configurations to make your WhatsApp AI assistant more useful:
Control Who Can Message Your AI
The allowedNumbers array in your config is your access control list. Add the WhatsApp IDs (phone numbers in international format followed by @s.whatsapp.net) of everyone who should be able to use your AI. Anyone not on this list will be ignored.
Set Up Auto-Reply Rules
You can configure OpenClaw to respond differently based on context. For example, you might want the AI to handle customer inquiries during business hours and send an "away" message after hours. This is configured through OpenClaw skills and automation rules.
Enable Media Handling
Baileys supports receiving and sending images, documents, audio, and video. OpenClaw can process images sent via WhatsApp (for example, reading text from a photo or describing an image) if you have a vision-capable model configured.
Connect Multiple Channels
One of OpenClaw's strengths is multi-channel support. You can run WhatsApp alongside Telegram, Discord, Slack, and more โ all connected to the same AI. Messages from any channel are processed by the same assistant with the same context and skills.
Troubleshooting Common Issues
QR Code Not Appearing
- Make sure the WhatsApp channel is set to
"enabled": truein your config. - Check that the
provideris set to"baileys"(not another provider name). - Restart the gateway with
openclaw gateway restartand watch the logs carefully. - Ensure Node.js 18+ is installed:
node --version.
QR Code Appears but Scanning Fails
- Make sure your terminal is wide enough to display the full QR code.
- Try a different terminal emulator if the characters look corrupted.
- Ensure your phone has a stable internet connection while scanning.
- If the QR code expired, wait a few seconds โ a new one will be generated automatically.
Messages Sent but No Response
- Check that the sender's number is in your
allowedNumberslist. - Verify
autoReplyis set totrue. - Check gateway logs for errors:
openclaw gateway logs. - Make sure your AI model (e.g., Claude, GPT-4) is properly configured and your API key is valid.
Session Disconnects Frequently
- Keep the phone connected to the internet. WhatsApp may disconnect linked devices if the phone is offline for extended periods.
- Do not use the same WhatsApp account on another WhatsApp Web session โ it will disconnect OpenClaw.
- Update to the latest version of OpenClaw and Baileys for bug fixes.
Risk of Account Restrictions
Since Baileys is unofficial, there is a small risk that WhatsApp could restrict your account. To minimize this risk:
- Use a dedicated number โ never your primary personal WhatsApp.
- Do not send bulk or unsolicited messages.
- Keep conversations natural and human-like.
- Avoid rapid-fire automated messaging to many different numbers.
- If your account gets temporarily restricted, stop using it for 24โ48 hours before reconnecting.
Real-World Use Cases
Once your OpenClaw WhatsApp setup is running, here are some ways people use it:
- Personal productivity. Send your AI quick tasks, reminders, and questions while on the go. "Summarize my emails," "Draft a reply to John," or "What is on my calendar tomorrow?"
- Customer support. Small businesses route customer WhatsApp messages to their AI for instant answers about hours, pricing, and FAQs.
- Team assistant. Add the AI number to a WhatsApp group and let team members ask it questions, look up information, or run automations.
- Smart home control. If you have connected OpenClaw to home automation tools, you can control devices by sending WhatsApp messages.
Businesses in cities like Austin and New York are already using OpenClaw with WhatsApp to stay connected to their AI assistants around the clock.
Frequently Asked Questions
Do I need a WhatsApp Business account to use OpenClaw with WhatsApp?
No. OpenClaw uses the Baileys provider, which works with a standard WhatsApp personal account. You do not need the official WhatsApp Business API or a Business account. However, we recommend using a dedicated phone number so your personal WhatsApp is not affected.
Is the Baileys provider free to use?
Yes. Baileys is an open-source, community-maintained library that reverse-engineers the WhatsApp Web protocol. There are no per-message fees or API costs. You only pay for the server running OpenClaw.
Can I use OpenClaw WhatsApp on the same number I use for personal chats?
Technically yes, but we strongly recommend against it. When OpenClaw connects via Baileys, it takes over the WhatsApp Web session for that number. Use a separate SIM or a virtual number service like Google Voice or a prepaid SIM.
What happens if the QR code expires before I scan it?
QR codes refresh automatically. If one expires, OpenClaw will generate a new one in the terminal. Simply scan the new code with your WhatsApp app. If you keep having trouble, restart the gateway and try again.
Will WhatsApp ban my number for using Baileys?
There is a small risk. Baileys is an unofficial integration and WhatsApp could flag accounts that use it. To minimize risk, avoid sending bulk messages, keep conversations natural, and use a dedicated number. Many users run Baileys-based setups for months without issues.
What's Next?
You now have a fully working OpenClaw WhatsApp integration. Your AI assistant is in your pocket, ready to help whenever you need it. Here are some next steps:
- Add Telegram as a second channel for redundancy and flexibility.
- Explore OpenClaw skills to add capabilities like web search, file management, calendar integration, and more.
- Set up automations that trigger based on WhatsApp messages โ for example, forwarding important messages to email or logging them to a spreadsheet.
Need Help?
Setting up WhatsApp with OpenClaw is straightforward, but every server environment is different. If you run into issues or want someone to handle the setup for you, we are here to help. Our professional setup service includes WhatsApp configuration as part of the package โ we will get everything running and tested on a 30-minute call.
Ready to connect WhatsApp to your AI?
Book a free 30-minute call and we'll set everything up for you โ WhatsApp, Telegram, skills, the works.
Book Your Free Call โ