Skip to main content
Run OpenClaw in a Hyperbrowser sandbox and connect it to WhatsApp. Your agent receives and responds to WhatsApp messages through the built-in WhatsApp Web / Baileys channel.

How It Works

  1. Create a sandbox from the openclaw base image.
  2. Configure OpenClaw with your model provider and the WhatsApp channel.
  3. Link a WhatsApp account by scanning a QR code.
  4. Start the OpenClaw gateway and message your agent.

Prerequisites

Quick Start

Create a sandbox, configure the WhatsApp channel with an allowlisted phone number, and start the gateway:

Verify the Setup

After linking, verify everything is running from the sandbox terminal or via the SDK:
Send a WhatsApp message from the allowed phone number to the linked WhatsApp number. With dmPolicy=allowlist, no pairing approval step is needed.

Personal Number Setup

If you want to use your own WhatsApp number instead of a dedicated one, enable selfChatMode. Replace step 4 in the quick start with:
With selfChatMode enabled, send a message in your own WhatsApp chat (“Message yourself”) and OpenClaw responds there.

Adding Group Chats

To let your agent respond in group chats when mentioned, add this configuration after the initial setup:
This means:
  • Only allowlisted senders can control the agent in groups.
  • The agent only responds when mentioned.

Pairing Mode

If you want new DM senders to require explicit approval instead of an allowlist, switch to pairing mode:
If you keep allowFrom populated alongside dmPolicy=pairing, allowlisted numbers bypass the pairing step.

Troubleshooting

  • WhatsApp link lost after restart — The WhatsApp session lives in ~/.openclaw. Use a volume to persist it across sandbox restarts.
  • Messages not delivered — Verify the channel is connected with openclaw channels status --probe. Check that allowFrom includes the correct E.164 phone number (for example +15551234567).
  • QR code expired — Run openclaw channels login --channel whatsapp again to generate a new QR code.
  • Gateway bind errors — If you only need access from inside the sandbox (not from the host), set gateway.bind to loopback instead of lan.

Next Steps

Sandbox Processes

Run and manage processes inside your sandbox.

Sandbox Snapshots

Save sandbox state and restore it later.

Volumes

Persist WhatsApp sessions and data across restarts.

Base Images

See all available base images.