Introduction

WhatsApp is the world's most-used messaging platform with over 2 billion active users. For many people — particularly outside the United States — WhatsApp is the primary communication channel for both personal and professional conversations. Running your OpenClaw agent through WhatsApp means interacting with your AI assistant in the same app you already use for everything else. The setup is more complex than Telegram, but for WhatsApp-native users, the result is a more natural integration.

Two Approaches to WhatsApp

OpenClaw supports two fundamentally different methods for WhatsApp integration:

Baileys (Unofficial): Uses an open-source reverse-engineered WhatsApp client library. Works with a regular WhatsApp account (not a business account). Does not require Meta's approval or payment. Uses a QR code scan to authenticate. Carries some risk of account action by Meta for terms of service violation.

WhatsApp Business API (Official): Uses Meta's official API. Requires a Meta Business account, a verified business phone number, and application approval. Costs money (per-message pricing). Carries no TOS risk. Required for any commercial or customer-facing getting it running.

For personal use, Baileys is the practical choice. For business use or any deployment involving customers, use the official Business API.

Baileys (Unofficial) Method

The Baileys integration for OpenClaw is maintained as a community Skill on ClawHub.

Step 1: Install the Baileys Skill

openclaw skill install whatsapp-baileys

Step 2: Configure in config.yaml

channels:
  whatsapp:
    provider: baileys
    session_path: ~/.openclaw/whatsapp-session
    allowed_contacts:
      - "+1234567890"  # Your phone number in international format

Step 3: Authenticate with QR code

Start OpenClaw with WhatsApp configured:

openclaw start

OpenClaw prints a QR code to the terminal. On your phone:

  1. Open WhatsApp → Settings → Linked Devices
  2. Tap "Link a Device"
  3. Scan the QR code in your terminal

Your WhatsApp account is now linked. The agent runs as your WhatsApp account, receiving and sending messages from your personal number.

Important caveats with Baileys:

  • This uses your personal WhatsApp number — messages sent by the agent appear to come from you
  • The session must be re-authenticated periodically (every 1–2 weeks)
  • Meta's terms of service technically prohibit automated bots on personal accounts. Enforcement is inconsistent but risk exists
  • Never use Baileys for customer-facing communications

WhatsApp Business API (Official)

The official route requires more setup but is the appropriate choice for any commercial use:

Step 1: Create a Meta Business Account

Go to business.facebook.com and create a Meta Business account. Verify your business with your legal business name and address.

Step 2: Set up WhatsApp Business Platform

In Meta Business Manager → WhatsApp → Get Started. You'll need a phone number not currently associated with a WhatsApp account (a dedicated business number or a new SIM).

Step 3: Generate API credentials

Create a Meta app with WhatsApp Business API access. Generate a permanent access token and note your Phone Number ID and Business Account ID.

Step 4: Configure OpenClaw

channels:
  whatsapp:
    provider: meta_business_api
    access_token: YOUR_PERMANENT_TOKEN
    phone_number_id: YOUR_PHONE_NUMBER_ID
    webhook_verify_token: any_secret_string_you_choose
    allowed_numbers:
      - "+1234567890"

Step 5: Configure the webhook

The Meta API uses webhooks to deliver messages to your OpenClaw instance. Your OpenClaw server must be accessible from the internet (use a VPS or ngrok for testing) and you need to configure the webhook URL in Meta's developer console.

WhatsApp vs Telegram for OpenClaw

FactorWhatsAppTelegram
Setup complexityMedium–HighVery Low
CostFree (Baileys) or per-message (API)Always free
Global user baseLarger (2B users)Smaller (800M users)
TOS safetyRisk (Baileys) / Safe (API)Always safe
Natural integrationHigh (for WhatsApp-native users)Medium

Recommendation: start with Telegram, add WhatsApp later. Telegram's superior bot API, simpler setup, and zero TOS risk make it the better starting point. Once you have a working OpenClaw configuration, adding WhatsApp as a secondary channel is straightforward.

Known Limitations

WhatsApp imposes limitations that don't apply to Telegram:

  • Message template requirements: the Business API requires pre-approved templates for outbound messages to users who haven't messaged you first in the last 24 hours
  • Media handling: sending files over 16 MB via WhatsApp requires special configuration; Telegram supports files up to 2 GB
  • Inline keyboards: Telegram's rich button interfaces are not supported in WhatsApp — only simple text replies
  • No username-based sending: you must know the phone number to message someone via WhatsApp

Frequently Asked Questions

Will Meta ban my account for using Baileys? It's possible but uncommon for personal use at low message volumes. Meta actively prevents commercial-scale bot activity. For typical personal OpenClaw use (a few hundred messages per day), enforcement action is rare but not impossible. Use the official API if account risk is unacceptable.

Can I use my existing personal WhatsApp number? With Baileys, yes — the agent runs as your number. With the Business API, you need a dedicated number that's not already on WhatsApp. Many users use an eSIM or second SIM for the business API number.

Is it possible to keep WhatsApp running normally alongside OpenClaw? With Baileys, the session runs as a linked device — your WhatsApp works normally on your phone while the agent also runs as a linked device. Both send and receive from the same number.

Wrapping Up

WhatsApp integration with OpenClaw is powerful for users who live in WhatsApp. The Baileys approach is practical for personal use; the official Business API is required for business deployments. For anyone just starting with OpenClaw, Telegram remains the simpler and safer first channel. For established OpenClaw users looking to integrate their most-used messaging app, the WhatsApp setup investment pays off in the convenience of a single communication interface for both personal messages and AI agent interactions.