guide

How to Connect WhatsApp to OpenClaw

Learn how to connect WhatsApp to OpenClaw and create an AI-powered WhatsApp bot. Step-by-step guide with QR code pairing and configuration.

This guide shows you how to connect your WhatsApp account to OpenClaw, enabling AI-powered responses to your messages. You'll link your WhatsApp via QR code and configure access controls.

⚠️Important: OpenClaw connects to your existing WhatsApp account as a linked device. It does not create a separate business account.

Prerequisites

Before connecting WhatsApp, ensure you have OpenClaw installed and the gateway running. See our installation guide if needed.

Step 1: Start the WhatsApp Login Flow

Run the channels login command to begin WhatsApp pairing:

bash
openclaw channels login

This displays a QR code in your terminal. You have about 60 seconds to scan it.

Step 2: Scan the QR Code

1

Open WhatsApp on your phone

Make sure you're using the primary device, not WhatsApp Web.

2

Go to Settings → Linked Devices

On iPhone: Settings → Linked Devices. On Android: ⋮ menu → Linked Devices.

3

Tap 'Link a Device'

You may need to authenticate with Face ID, fingerprint, or PIN.

4

Scan the terminal QR code

Point your camera at the QR code displayed in your terminal.

Once scanned, OpenClaw will authenticate and your WhatsApp will show a new linked device.

Step 3: Configure Access Controls

By default, OpenClaw uses 'pairing' mode where new contacts receive a one-time code. Configure this in your openclaw.json:

json
{
  "channels": {
    "whatsapp": {
      "dmPolicy": "pairing",
      "groups": {
        "*": { "requireMention": true }
      }
    }
  }
}

DM Policy options:

1

pairing (default)

New senders get a time-limited approval code. Most secure option.

2

allowlist

Only pre-approved phone numbers can message your AI.

3

open

Anyone can message. Use with caution - only for public-facing bots.

4

disabled

No DM access at all. Groups only.

Step 4: Approve Pairing Requests

When someone new messages your AI, they'll receive a pairing code. Approve them via CLI:

bash
# List pending pairing requests
openclaw pairing list whatsapp

# Approve a request
openclaw pairing approve whatsapp <code>

Step 5: Test Your Connection

Send a test message to verify everything works:

bash
openclaw message send --target +15555550123 --message "Hello from OpenClaw!"
Your WhatsApp is now connected to OpenClaw! Messages will be processed by your AI agent.

Connect WhatsApp in 60 seconds

Skip the CLI setup. Deploy a WhatsApp AI agent with 1 click using clawd.new.

Deploy WhatsApp Bot →
How to Connect WhatsApp to OpenClaw - Complete Guide (2025) | clawd.new