Connect WhatsApp

TL;DR: Run openclaw channels login whatsapp, scan the QR code, set allowlist, and send a test message.

Applies to: Windows, macOS, Linux
Audience: Power users, developers, security-conscious, enterprise
Last updated: 2026-02-23

power-user whatsapp channels cli

Table of contents

  1. Prerequisites
  2. Login Command
  3. Scan QR Code
  4. Configure Allowlist
  5. Send First Message
  6. Next Steps
  7. FAQ

Prerequisites

Login Command

Start WhatsApp linking:

openclaw channels login whatsapp

This will display a QR code in your terminal.

Scan QR Code

  1. Open WhatsApp on your phone
  2. Go to Settings > Linked Devices
  3. Tap “Link a device”
  4. Scan the QR code shown in your terminal

Configure Allowlist

By default, only unknown senders must pair. To allow specific contacts, edit ~/.openclaw/openclaw.json:

{
  "channels": {
    "whatsapp": {
      "allowFrom": ["+15555550123", "family@example.com"]
    }
  }
}

Use "*" to allow anyone (not recommended).

Send First Message

Send a test message to your bot in WhatsApp to verify the connection.

Next Steps

FAQ

Q: Do I need to scan QR each time?
A: No. Only on first link. Re-linking will invalidate old sessions.

Q: Can I use WhatsApp Business?
A: Yes, but ensure the number matches your allowlist.

Q: What about groups?
A: Configure channels.whatsapp.groups to limit which groups the bot joins.

Q: How do I disconnect?
A: Run openclaw channels logout whatsapp.

Recommended next

Connect Telegram