🦞OpenClaw Guide
← All Integrations
💬

WhatsApp

Medium⏱️ 15-30 minutes

Your AI assistant in your pocket

Complete Guide to OpenClaw WhatsApp Integration

WhatsApp is the world's most popular messaging app with over 2 billion active users. With the OpenClaw WhatsApp integration, your AI assistant lives right where you already spend your time. No new apps to install, no interfaces to learn. Just message your assistant like you'd message a friend.

This comprehensive guide covers everything you need to know about setting up and using OpenClaw with WhatsApp, including two different integration methods, detailed troubleshooting, and best practices for getting the most out of your AI assistant.

Two Ways to Connect: Choose Your Path

OpenClaw supports two distinct methods for WhatsApp integration, each with its own advantages:

Method 1: wacli (Recommended for Personal Use)

The wacli method uses the WhatsApp Web protocol to connect your personal or business WhatsApp account directly to OpenClaw. This is the easiest and fastest way to get started with OpenClaw WhatsApp integration.

Advantages of wacli:

  • Quick setup in under 15 minutes
  • Works with any WhatsApp account (personal or business)
  • No approval process or business verification required
  • Free to use with no per-message costs
  • Full access to all WhatsApp features including groups
  • Perfect for personal assistants and small teams

How wacli works:

wacli connects to WhatsApp using the same protocol as WhatsApp Web. When you scan the QR code, you're linking OpenClaw to your WhatsApp account just like you would link a browser session. Your messages are received in real-time, processed by your AI assistant, and responses are sent back through the same connection.

The connection uses WhatsApp's end-to-end encryption, so your messages remain private. OpenClaw processes everything locally on your machine or server — nothing goes through third-party services.

Method 2: WhatsApp Business API (Official Method)

The WhatsApp Business API is Meta's official solution for businesses to integrate WhatsApp into their systems. This method requires business verification but provides an officially supported integration path.

Advantages of Business API:

  • Officially supported by Meta
  • Higher message limits for large-scale use
  • Business profile with verified badge
  • Template messages for proactive outreach
  • Better suited for commercial applications
  • Compliant with WhatsApp's terms of service

Business API considerations:

  • Requires Meta Business verification (can take days to weeks)
  • Per-conversation pricing applies
  • More complex initial setup
  • Needs a dedicated phone number not used elsewhere

Understanding QR Code Pairing

Both methods involve QR code pairing, but they work slightly differently:

wacli QR Code Pairing

When you start OpenClaw with the wacli integration for the first time, it generates a QR code in your terminal or logs. Here's what happens:

  1. QR Code Generation: OpenClaw generates a unique QR code containing encrypted session information
  2. Phone Scanning: You open WhatsApp on your phone, go to Linked Devices, and scan the QR code
  3. Session Establishment: WhatsApp creates a linked session, similar to WhatsApp Web
  4. Persistent Connection: The session remains active until you explicitly log out or it expires

Important notes about QR pairing:

  • The QR code expires after about 60 seconds — if it times out, restart to get a new one
  • You can have up to 4 linked devices per WhatsApp account
  • If you log out from your phone's Linked Devices menu, OpenClaw will need to re-pair
  • Session data is stored locally and persists across restarts

Business API Authentication

The Business API uses a different flow involving Meta Business Manager and API credentials rather than QR codes. You'll configure API tokens directly in your OpenClaw configuration.

Detailed Setup: wacli Method

Prerequisites

  • A smartphone with WhatsApp installed and activated
  • OpenClaw installed and running on macOS, Linux, or a server
  • A terminal or SSH access to view the QR code
  • Stable internet connection on both phone and server

Step-by-Step wacli Setup

Step 1: Configure OpenClaw

Add the WhatsApp configuration to your OpenClaw config file (usually ~/.openclaw/config.yaml):

yaml
channels:  whatsapp:    enabled: true    method: wacli    allowedUsers:      - "1234567890@s.whatsapp.net"  # Your WhatsApp number    # Optional: specific number to use as assistant    # assistantNumber: "0987654321@s.whatsapp.net"

The allowedUsers list uses the format phonenumber@s.whatsapp.net where the phone number includes the country code without the + sign.

Step 2: Start OpenClaw

Run OpenClaw in a terminal where you can see the output:

bash
openclaw gateway start

Watch the terminal for the QR code to appear. It will display as ASCII art that your phone can scan.

Step 3: Scan the QR Code

On your phone:

  1. Open WhatsApp
  2. Tap the three dots menu (Android) or Settings (iOS)
  3. Select "Linked Devices"
  4. Tap "Link a Device"
  5. Scan the QR code displayed in your terminal

Step 4: Verify Connection

Once paired, you'll see a confirmation message in the terminal. Send a test message to verify:

  1. Open a chat with the WhatsApp account you paired
  2. Send any message like "Hello"
  3. Your AI assistant should respond

Detailed Setup: WhatsApp Business API

Prerequisites

  • A Meta Business account
  • A verified business (Facebook Business Verification)
  • A phone number not currently used with WhatsApp
  • A Business Solution Provider (BSP) or direct API access

Step-by-Step Business API Setup

Step 1: Create Meta Business Account

  1. Go to business.facebook.com
  2. Create a new Business account or use an existing one
  3. Complete the business verification process (may require documents)

Step 2: Set Up WhatsApp Business Account

  1. In Meta Business Suite, go to Business Settings
  2. Find WhatsApp Accounts under Accounts
  3. Add a new WhatsApp Business Account
  4. Provide your business information and display name

Step 3: Register Your Phone Number

  1. Add a phone number to your WhatsApp Business Account
  2. Verify the number via SMS or voice call
  3. Wait for Meta to approve your number (usually 24-48 hours)

Step 4: Generate API Credentials

  1. Create a System User in Business Settings
  2. Generate an access token with WhatsApp permissions
  3. Note your Phone Number ID and WhatsApp Business Account ID

Step 5: Configure OpenClaw

Add the Business API configuration:

yaml
channels:  whatsapp:    enabled: true    method: business_api    accessToken: "your-long-lived-access-token"    phoneNumberId: "your-phone-number-id"    businessAccountId: "your-business-account-id"    webhookVerifyToken: "a-secret-string-you-create"    allowedUsers:      - "1234567890"  # Phone numbers that can interact

Step 6: Set Up Webhook

The Business API requires a webhook to receive messages:

  1. OpenClaw provides a webhook endpoint at /webhooks/whatsapp
  2. Configure this URL in your Meta App settings
  3. Use the webhookVerifyToken you set in your config
  4. Subscribe to the messages webhook field

Rate Limits and Best Practices

wacli Rate Limits

While wacli doesn't have official rate limits, WhatsApp monitors for unusual activity:

  • Recommended limits: No more than 200-300 messages per day to avoid detection
  • Burst sending: Avoid sending many messages in quick succession
  • Group messages: Be especially careful with group messaging frequency
  • Media: Large file transfers may be slower than text

Best practices for wacli:

  • Add natural delays between messages (OpenClaw does this automatically)
  • Don't spam groups or send unsolicited messages
  • Keep your phone connected to the internet
  • Monitor for any warnings from WhatsApp

Business API Rate Limits

The Business API has tiered rate limits based on your quality rating:

Quality TierMessages per 24 hours
Unverified250
Tier 11,000
Tier 210,000
Tier 3100,000
Tier 4Unlimited

Best practices for Business API:

  • Start with the template message for first contact (required)
  • Respond within 24 hours to keep the conversation window open
  • Monitor your quality rating in Meta Business Manager
  • Use message templates for notifications and proactive messages

Troubleshooting Guide

Common wacli Issues

QR Code Not Appearing

  • Check that OpenClaw has permission to write to the terminal
  • Try running in a different terminal emulator
  • Check the logs for any error messages
  • Ensure no other wacli instance is running

QR Code Times Out

  • QR codes expire after ~60 seconds
  • Restart OpenClaw to generate a new QR code
  • Have your phone ready before starting

Connection Drops Frequently

  • Ensure your server has stable internet
  • Check if your phone's WhatsApp is updated
  • Look for "Linked Devices" errors on your phone
  • Consider using a dedicated phone for better stability

"Session Logged Out" Errors

  • WhatsApp may disconnect sessions for security
  • Re-scan the QR code to re-establish connection
  • Check if you accidentally logged out from your phone

Messages Not Sending

  • Verify the recipient number format is correct
  • Check your allowedUsers configuration
  • Look for rate limiting warnings in logs
  • Ensure the recipient hasn't blocked your number

Common Business API Issues

Webhook Not Receiving Messages

  • Verify your webhook URL is publicly accessible
  • Check SSL certificate is valid
  • Confirm webhook verification token matches
  • Review Meta's webhook delivery logs

401 Unauthorized Errors

  • Access token may have expired
  • Regenerate token in Meta Business Settings
  • Verify token has correct permissions

Template Message Rejected

  • Review template for policy violations
  • Ensure template is approved before using
  • Check template parameters are correctly formatted

Low Quality Rating

  • Too many users blocking or reporting
  • Review message content for spam-like patterns
  • Reduce message frequency
  • Improve message relevance

Security Considerations

End-to-End Encryption

WhatsApp uses the Signal protocol for end-to-end encryption. When using wacli:

  • Messages are encrypted between your phone and contacts
  • OpenClaw receives decrypted messages through the linked session
  • Processing happens locally on your server
  • No messages pass through Meta's servers in plaintext

Data Privacy

  • All message processing happens on your OpenClaw instance
  • No data is sent to third-party AI services unless you configure them
  • Session credentials are stored locally
  • You control data retention and deletion

Recommendations

  • Use a dedicated WhatsApp number for your assistant
  • Regularly review linked devices on your phone
  • Keep OpenClaw and dependencies updated
  • Use strong authentication for your server
  • Consider VPN if connecting from restricted regions

Advanced Configuration

Multiple Account Support

You can run multiple WhatsApp accounts by using separate OpenClaw instances or configuring multiple numbers:

yaml
channels:  whatsapp:    enabled: true    method: wacli    instances:      personal:        sessionName: "personal"        allowedUsers: ["1234567890@s.whatsapp.net"]      work:        sessionName: "work"        allowedUsers: ["0987654321@s.whatsapp.net"]

Custom Response Formatting

Configure how your assistant formats responses:

yaml
channels:  whatsapp:    formatting:      maxLength: 4096  # WhatsApp's message limit      splitLongMessages: true      useMarkdown: true  # WhatsApp supports basic markdown

Voice Message Handling

OpenClaw automatically transcribes voice messages:

yaml
channels:  whatsapp:    voice:      transcribe: true      transcriptionModel: whisper      respondWithVoice: false  # Set true to reply with audio

Comparison: wacli vs Business API

FeaturewacliBusiness API
Setup time15 minutesDays to weeks
CostFreePer-conversation
Business verificationNot requiredRequired
Message limitsInformal (~300/day)Tiered (up to unlimited)
Official supportCommunityMeta
Terms complianceGray areaFully compliant
Best forPersonal use, testingCommercial, high-volume

Getting Help

If you encounter issues with your OpenClaw WhatsApp integration:

  1. Check the logs: openclaw gateway logs
  2. Review this troubleshooting guide
  3. Search existing issues on GitHub
  4. Join the OpenClaw community Discord for real-time help
  5. Open a GitHub issue with detailed information

When reporting issues, include:

  • Your OpenClaw version
  • Which method you're using (wacli or Business API)
  • Relevant error messages from logs
  • Steps to reproduce the issue

Conclusion

The OpenClaw WhatsApp integration brings your AI assistant to the messaging app you already use daily. Whether you choose the quick wacli setup for personal use or the official Business API for commercial applications, you'll have a powerful AI assistant just a message away.

Start with wacli if you want to get running quickly, and consider migrating to the Business API if you need higher volumes or official support. Either way, you're getting the full power of OpenClaw delivered through WhatsApp's familiar interface.

Features

Voice messages

Send voice notes and get transcribed responses. Perfect for when you're on the go. OpenClaw uses Whisper for accurate transcription.

File sharing

Share documents, images, and files directly in chat. Your assistant can read PDFs, analyze images, and process spreadsheets.

Group support

Add your assistant to WhatsApp groups for team coordination and shared task management.

Rich formatting

Receive nicely formatted responses with lists, links, and structured information using WhatsApp's markdown support.

Two integration methods

Choose between wacli for quick personal setup or Business API for official commercial use.

End-to-end encryption

Messages stay encrypted with WhatsApp's Signal protocol. Processing happens locally on your server.

Use Cases

Quick questions on the go

Ask anything while you're commuting, waiting in line, or between meetings.

Email management

Check, summarize, and respond to emails without opening your inbox.

Task capture

Voice note your tasks and ideas. Your assistant transcribes and organizes them.

Research requests

Ask for information and get summarized results delivered to your chat.

Team coordination

Add your assistant to team groups for shared task management and quick lookups.

Personal productivity

Daily briefings, reminders, and quick access to your calendar and notes.

Setup Guide

Requirements

  • WhatsApp Business API account or WhatsApp bridge (wacli)
  • Phone number dedicated to your assistant (recommended)
  • OpenClaw running on a server or Mac
  • Stable internet connection
1

Choose your integration method

wacli is faster and works with any WhatsApp account. Business API is official but requires business verification. Most personal users should start with wacli.

2

Configure OpenClaw (wacli)

Add to config.yaml: channels: whatsapp: enabled: true method: wacli allowedUsers: - "1234567890@s.whatsapp.net" Replace with your number including country code.

3

Start OpenClaw and scan QR code

Run 'openclaw gateway start' and watch for the QR code in terminal. Open WhatsApp → Settings → Linked Devices → Link a Device → Scan the QR code.

4

Test the connection

Send a message to your WhatsApp (or the assistant's number if using a dedicated phone). You should receive a response within seconds.

5

(Business API) Create Meta Business Account

Go to business.facebook.com, create/verify your business, set up WhatsApp Business Account, register a phone number, and generate API credentials.

6

(Business API) Configure webhooks

Set up a webhook endpoint for receiving messages. OpenClaw provides /webhooks/whatsapp. Configure in Meta App settings with your verify token.

Configuration Example

# wacli method (recommended for personal use)
channels:
  whatsapp:
    enabled: true
    method: wacli
    allowedUsers:
      - "1234567890@s.whatsapp.net"  # Your phone number with country code

# Business API method (for commercial use)
channels:
  whatsapp:
    enabled: true
    method: business_api
    accessToken: "your-access-token"
    phoneNumberId: "your-phone-number-id"
    webhookVerifyToken: "your-secret-token"

Limitations

  • ⚠️wacli: Informal rate limit of ~300 messages/day
  • ⚠️Business API: Requires Meta business verification (takes days to weeks)
  • ⚠️Business API: Per-conversation pricing applies
  • ⚠️QR code pairing required for wacli (session can expire)

Frequently Asked Questions

What's the difference between wacli and Business API?

wacli uses WhatsApp Web protocol for quick setup (15 minutes) with any account, but has informal rate limits and is in a gray area of ToS. Business API is Meta's official solution requiring business verification (days/weeks) but offers higher limits and full compliance. Start with wacli for testing, consider Business API for production commercial use.

Do I need WhatsApp Business for wacli?

No, wacli works with regular WhatsApp accounts. You can use your personal number or create a new account for your assistant. WhatsApp Business is only required for the official Business API method.

How does QR code pairing work?

When you start OpenClaw with wacli, it displays a QR code in your terminal. Scanning this with WhatsApp creates a 'Linked Device' session, similar to WhatsApp Web. The session persists until you log out or it expires. QR codes timeout after ~60 seconds, so have your phone ready.

Why did my wacli session disconnect?

Sessions can disconnect if: your phone loses internet for extended periods, you log out from Linked Devices, WhatsApp detects unusual activity, or the session expires. Simply restart OpenClaw and scan a new QR code to reconnect.

What are the rate limits?

wacli: Informal limit of ~200-300 messages/day to avoid detection. Business API: Tiered from 250/day (unverified) to unlimited (Tier 4). Avoid bursts of rapid messages with either method.

Can I use my existing WhatsApp number?

Yes, but we recommend a separate number for your assistant to keep personal and assistant messages separate. For wacli, you can link OpenClaw as an additional device on your existing account. For Business API, you need a dedicated number not used elsewhere.

Is this secure?

Yes. WhatsApp uses end-to-end encryption (Signal protocol). With wacli, your linked session receives decrypted messages but processing happens locally on your OpenClaw server. No data passes through third-party services unless you configure external integrations.

Will my contacts see me as online all the time?

With wacli, the linked session doesn't change your online status — that's controlled by your phone's WhatsApp app. You can configure privacy settings in WhatsApp as usual.

Can the assistant send messages first (proactively)?

With wacli: Yes, OpenClaw can send messages to contacts anytime. With Business API: You need approved template messages for proactive outreach, and regular messages only work within 24 hours of user contact.

How do I handle voice messages?

OpenClaw automatically transcribes voice messages using Whisper. You can configure whether to respond with text or voice in your config. Voice transcription happens locally for privacy.

Can I use WhatsApp groups?

Yes, with wacli you can add your assistant to groups. Configure which groups it responds in via allowedGroups in your config. Business API has more limited group support.

What if the QR code doesn't appear?

Check that your terminal supports the QR display, no other wacli instance is running, and review logs for errors. Try a different terminal emulator or check if OpenClaw has proper permissions.

How do I switch from wacli to Business API?

You can run both simultaneously with different phone numbers, or transition by: setting up Business API alongside wacli, testing thoroughly, then disabling wacli. Your config supports both methods.

Does it work in countries where WhatsApp Web is restricted?

wacli uses the same protocol as WhatsApp Web, so if Web is blocked, wacli may also be affected. Consider using a VPN on your server if needed. Business API uses different endpoints that may work better.

🔥 Your AI should run your business, not just answer questions.

We'll show you how.Free to join.

Join Vibe Combinator →

🐙 Your AI should run your business.

Weekly live builds + template vault. We'll show you how to make AI actually work.Free to join.

Join Vibe Combinator →