Connect OpenClaw to WhatsApp: Easy Setup

SetupWhatsApp

Connect OpenClaw to WhatsApp: Easy Setup

Connect OpenClaw to WhatsApp. Link your account via QR code and start chatting.

6 min readLast updated Feb 18, 2026
Stuck?Check the troubleshooting index or ask in Discord.

Overview

WhatsApp lets you chat with your OpenClaw assistant directly from WhatsApp. This guide walks you through connecting your WhatsApp account via QR code and configuring access control.

What you'll need
  • A WhatsApp account
  • OpenClaw installed (see Getting Started)
  • OpenClaw running on Node.js (not Bun — see troubleshooting)
Use a separate number
OpenClaw recommends using a separate WhatsApp number for your assistant if possible. This keeps your personal chats separate from the AI assistant.

Configure OpenClaw

First, configure WhatsApp access in your config file:

Open your config.yaml and add:

config.yaml
channels:
  whatsapp:
    dmPolicy: "pairing"  # pairing | allowlist | open | disabled
    allowFrom: ["+15551234567"]  # Your phone number in E.164 format
    groupPolicy: "allowlist"

WhatsApp uses QR code linking (like WhatsApp Web). Run this command:

terminal
openclaw channels login --channel whatsapp

This will display a QR code. Scan it with your WhatsApp app:

1

Open WhatsApp on your phone

Open WhatsApp and go to Settings → Linked Devices

2

Scan the QR code

Tap "Link a Device" and scan the QR code shown in your terminal

3

Wait for confirmation

Once linked, you'll see "Linked" in your terminal

For a work account
To link a different WhatsApp account: openclaw channels login --channel whatsapp --account work

Start the Gateway

Start OpenClaw and let it connect to WhatsApp:

terminal
openclaw gateway

You should see logs indicating WhatsApp is connecting. Once connected, it's time to authorize yourself.

Pair Your Account

By default, WhatsApp DMs require pairing (authorization). Here's how to approve yourself:

1

Find your pairing code

Send any message to your OpenClaw WhatsApp from your phone. Then run:

bash
openclaw pairing list whatsapp

You'll see a code like ABC123.

2

Send the code to the bot

Reply to any message from the bot with your code:

text
ABC123
3

Approve the pairing

Back in your terminal:

bash
openclaw pairing approve whatsapp ABC123
Pairing expires after 1 hour
If you don't complete pairing within an hour, you'll need to repeat the process.

Test It

Now let's verify everything works:

1

Send a message

Send a message to your OpenClaw WhatsApp from your phone

2

Wait for a response

Your AI assistant should respond! If it doesn't, check the troubleshooting section below.

You're set up!
Your WhatsApp is now connected to OpenClaw. You can now chat with your AI assistant via WhatsApp.

Troubleshooting

Common issues and how to fix them:

"Not linked" — QR required

Run openclaw channels login --channel whatsapp to re-link your account.

Linked but disconnected

  • Check that the gateway is running
  • Try re-linking: openclaw channels login --channel whatsapp
  • Check logs: openclaw logs --follow

Group messages not working

  • Check groupPolicy in your config
  • Make sure your number is in groupAllowFrom
  • Groups require mention by default — mention the bot to trigger it

"Bun runtime" warning

WhatsApp doesn't work well with Bun. Use Node.js instead: npm install -g openclaw