Skip to content

How to Connect OpenClaw to WhatsApp: Step-by-Step

nacre.sh TeamMay 3, 20269 min read

Connect OpenClaw to WhatsApp using the WhatsApp Business API. Complete guide covering Meta developer setup, webhook configuration, and testing your agent.

openclaw whatsapp integrationopenclaw whatsappwhatsapp ai agentopenclaw channels

OpenClaw WhatsApp integration is the most complex channel setup, but it unlocks the ability to interact with your AI agent on the world's largest messaging platform. WhatsApp requires using the WhatsApp Business API through Meta's developer platform — unlike Telegram, there's no simple bot token approach. This guide walks through the entire process.

Prerequisites

  • A Meta developer account (free at developers.facebook.com)
  • A phone number not already associated with WhatsApp (or use a virtual number)
  • A publicly accessible HTTPS URL for webhooks (your OpenClaw instance must be reachable from the internet)
  • OpenClaw installed and running

Step 1: Create a Meta App

  1. Go to developers.facebook.com → My Apps → Create App
  2. Select "Business" as the app type
  3. Give your app a name (e.g., "My OpenClaw Agent")
  4. From the dashboard, add the "WhatsApp" product

Step 2: Get Your Credentials

In the WhatsApp section of your Meta app:

  1. Note your Phone Number ID
  2. Generate a Permanent Access Token (or use the temporary test token to start)
  3. Note your WhatsApp Business Account ID

Step 3: Configure OpenClaw

Add to your ~/.openclaw/openclaw.json:

{
  "channels": {
    "whatsapp": {
      "enabled": true,
      "phone_number_id": "YOUR_PHONE_NUMBER_ID",
      "access_token": "YOUR_ACCESS_TOKEN",
      "verify_token": "your-random-verify-string",
      "webhook_path": "/webhook/whatsapp"
    }
  }
}

Generate a random string for verify_token — it's used to verify your webhook with Meta.

Step 4: Configure the Webhook

Your OpenClaw instance needs a public HTTPS URL. In the Meta app's WhatsApp settings:

  1. Click "Configure Webhooks"
  2. Enter your webhook URL: https://yourdomain.com/webhook/whatsapp
  3. Enter your verify token (from the config above)
  4. Subscribe to the "messages" webhook field
  5. Click "Verify and Save"

Meta makes a GET request to your webhook URL to verify it. OpenClaw handles this automatically.

Step 5: Test Your Integration

Send a WhatsApp message to your test phone number from the Meta developer console, or from your own WhatsApp to the registered number. OpenClaw will receive and respond.

Limitations

WhatsApp via the Business API has some constraints:

  • You can only send messages to users who have first messaged you within the last 24 hours (outside this window, you need pre-approved message templates)
  • Meta requires app review to message users at scale; for personal use, the development mode sandbox is sufficient

nacre.sh Simplification

nacre.sh provides a simpler WhatsApp connection flow in the dashboard. The webhook URL is automatically configured to your nacre.sh instance URL, eliminating the need to manage webhooks manually.

Frequently Asked Questions

Do I need a WhatsApp Business account?

You need to use the WhatsApp Business API (for developers), but you don't need a WhatsApp Business subscription. The Meta developer program includes a free sandbox for testing.

Can I use my personal WhatsApp number?

No. The WhatsApp Business API requires a number not currently registered on personal WhatsApp. Use a secondary number or a virtual phone number service.

Is there a simpler WhatsApp integration?

Some OpenClaw community skills connect via Baileys (WhatsApp's unofficial web API), which only requires scanning a QR code. This is simpler but violates WhatsApp's Terms of Service and risks account bans.

nacre.sh

Run OpenClaw without the server headaches

Dedicated instance, automatic TLS, nightly backups, and 290+ LLM integrations. Live in under 90 seconds from $12/month.

Deploy your agent →

Related posts