You installed OpenClaw. You picked your model. Now you want to talk to your AI agent from WhatsApp. The same app you already use 50 times a day. No new interface. No browser tab. Just message your agent like you'd message a friend. Here's exactly how to set it up.

What You Need Before Starting

Before you touch the WhatsApp config, make sure you have these basics covered:

If you haven't installed OpenClaw yet, head to installopenclawnow.com and follow the one-liner. Takes about 2 minutes.

Dedicated Number vs Personal Number

You have two options. Each works. One is cleaner.

Recommended: Use a dedicated number. Get a cheap prepaid SIM or an eSIM. Register a separate WhatsApp account on it. Link that account to OpenClaw. Your personal WhatsApp stays untouched. No crossed wires. No accidental agent replies to your mom.

Personal number works too. OpenClaw supports it. When your linked self number is also in the allowlist, self-chat safeguards kick in automatically. It skips read receipts for self-chat turns and avoids mention loops that would ping yourself. But it can get messy if you're not careful with your config.

For a dedicated number, your config is simple:

{
  channels: {
    whatsapp: {
      dmPolicy: "allowlist",
      allowFrom: ["+15551234567"]  // your personal number
    }
  }
}

For a personal number setup, OpenClaw writes a self-chat-friendly baseline automatically during onboarding. It sets selfChatMode: true and adds your number to allowFrom.

Step-by-Step WhatsApp Setup

Four steps. Under 5 minutes if everything goes right.

Step 1: Configure your access policy

Open your openclaw.json config file and add the WhatsApp channel block. At minimum:

{
  channels: {
    whatsapp: {
      dmPolicy: "pairing",
      allowFrom: ["+15551234567"]
    }
  }
}

The dmPolicy: "pairing" is the default. It means new contacts have to go through a pairing flow. They message the agent, get a pairing code, and you approve or deny via CLI. Simple access control without touching the config every time.

Step 2: Link WhatsApp via QR code

Run this in your terminal:

openclaw channels login --channel whatsapp

A QR code appears in your terminal. On your phone, open WhatsApp. Go to Settings > Linked Devices > Link a Device. Scan the code.

That's it. WhatsApp treats OpenClaw like another linked device (same as WhatsApp Web or Desktop).

How the WhatsApp Bridge Works Under the Hood

OpenClaw uses the Baileys library to connect to WhatsApp. Baileys is an open-source, community-maintained implementation of the WhatsApp Web protocol. It does not require the WhatsApp Business API or a Meta developer account.

What this means in practice:

One important limitation: WhatsApp allows a maximum of 4 linked devices per account. If you are already using WhatsApp Web, WhatsApp Desktop, and another linked device, you may need to unlink one before connecting OpenClaw.

Multiple accounts? You can link more than one WhatsApp number. Just pass the account flag: openclaw channels login --channel whatsapp --account work

Step 3: Start the gateway

openclaw gateway

The gateway owns the WhatsApp socket and handles reconnections. Keep it running. If you're on a Mac Mini or VPS, set it up as a daemon so it survives reboots.

Step 4: Approve pairing (if using pairing mode)

When someone messages your agent for the first time, they'll get a pairing code. Approve it:

openclaw pairing list whatsapp
openclaw pairing approve whatsapp <CODE>

Pairing requests expire after 1 hour. You can have up to 3 pending requests per channel.

Access Control: Who Can Talk to Your Agent

This is the part most people skip and then regret. Lock it down from day one.

OpenClaw supports four DM policies for WhatsApp:

PolicyWho Can MessageBest For
pairingAnyone, but requires approvalDefault. Good for most setups.
allowlistOnly numbers in allowFromProduction. Locked down tight.
openEveryone (requires allowFrom: ["*"])Testing only. Don't run this in production.
disabledNobodyWhen you only want group access.

For a solo founder running a personal agent: allowlist with your own number is the way to go. Nobody else needs to talk to your agent.

Never run open policy on a public-facing number. Anyone who discovers your number can talk to your agent. That means they can trigger tools, read files, run commands. Lock it down.

You can also set per-account overrides if you run multiple WhatsApp numbers:

{
  channels: {
    whatsapp: {
      dmPolicy: "allowlist",
      allowFrom: ["+15551234567"],
      accounts: {
        work: {
          dmPolicy: "pairing",
          allowFrom: ["+15559876543", "+15558765432"]
        }
      }
    }
  }
}

Using OpenClaw in WhatsApp Groups

Yes, your agent can participate in group chats. No, it won't reply to every single message (unless you want it to).

Group access has two layers:

1. Group membership allowlist. Which groups can the agent see? If you set groups in your config, only those groups are eligible. Omit it and all groups are fair game.

2. Group sender policy. Who in those groups can trigger the agent?

{
  channels: {
    whatsapp: {
      groupPolicy: "allowlist",
      groupAllowFrom: ["+15551234567"]
    }
  }
}

By default, the agent only responds when mentioned. It uses WhatsApp mentions, configured regex patterns, and reply-to-bot detection. So someone replying to the agent's message also counts as a mention.

One thing to know: sender allowlists are evaluated before mention detection. So even if someone @mentions your agent, they'll be blocked if they're not on the allowlist when groupPolicy: "allowlist" is set.

Media Handling in WhatsApp

Your agent can both receive and send media through WhatsApp. Here is how each type works:

File size limits follow WhatsApp's own restrictions: 16MB for media, 100MB for documents. OpenClaw handles the download and caching automatically. Files are stored temporarily in your workspace directory under ~/.openclaw/whatsapp/media/.

Self-Chat Mode: Talk to Yourself (Productively)

This is one of the best WhatsApp features most people miss. When your personal number is in allowFrom, OpenClaw activates self-chat safeguards:

You literally message yourself on WhatsApp and your agent responds. It looks like a conversation with yourself. Except one side is an AI that can check your calendar, search the web, manage your files, and run automations.

Troubleshooting Common Issues

Things that will go wrong and how to fix them:

QR code expired. They're time-limited. Run openclaw channels login --channel whatsapp again and scan quickly. Don't leave it sitting.

"Outbound sends fail fast" means your gateway isn't running or the WhatsApp listener isn't active. Start the gateway: openclaw gateway. If it was running, restart it.

Agent not responding in groups. Check your groupPolicy. If it's set to allowlist, make sure the sender is in groupAllowFrom. Also verify you're mentioning the agent properly.

WhatsApp disconnects after a few hours. This happens. The gateway handles reconnections automatically. If it keeps disconnecting, run openclaw doctor --fix to diagnose issues. You can also try openclaw channels logout --channel whatsapp and re-link.

Duplicate messages or echo loops. Usually means selfChatMode isn't set properly on a personal number. Check that your number is in allowFrom and let OpenClaw's self-chat protections do their job.

For more fixes, check our full OpenClaw troubleshooting guide.

What You Can Actually Do from WhatsApp

Once connected, your WhatsApp becomes a command center. Everything your agent can do, you can trigger from a message:

The full list of possibilities depends on your skills and config. Check 25+ OpenClaw use cases for inspiration.

I run 13 agents from my WhatsApp and Telegram setup. Content creation, email management, research, social media scheduling. All from the same messaging apps I was already using. That's the point. You don't need another dashboard. You need your tools where you already are.

Advanced Configuration Tips

Once your basic setup works, these tweaks make the experience smoother:

Frequently Asked Questions

How do I connect OpenClaw to WhatsApp?

OpenClaw connects to WhatsApp through a WhatsApp Web bridge. During setup, scan a QR code with your phone to link the session. Once connected, your agent can send and receive WhatsApp messages, images, and voice notes.

Can I use OpenClaw as a WhatsApp assistant?

Yes, OpenClaw works as a full WhatsApp assistant. Message your agent on WhatsApp and it responds with AI-powered answers, executes tasks, searches the web, and manages your tools. It works just like chatting with a human assistant.

Does the OpenClaw WhatsApp integration work 24/7?

Yes, as long as your OpenClaw instance is running and the WhatsApp Web session stays active. The session may need periodic re-authentication by scanning the QR code again. A stable internet connection ensures continuous operation.

Can OpenClaw send WhatsApp messages to my contacts?

Yes, OpenClaw can send messages to your WhatsApp contacts when configured to do so. You can set up automated messages, reminders, and notifications. Always use this responsibly and respect your contacts' preferences.

Is the OpenClaw WhatsApp setup difficult?

No, the WhatsApp setup is straightforward. Install the WhatsApp channel plugin, scan the QR code with your phone, and you are connected. The process takes about 5 minutes. OpenClaw handles the technical bridge automatically.

OpenClaw Lab is the #1 community for founders building AI agent systems. I share the exact playbooks, skill files, and workflows inside. Weekly lives, expert AMAs, and 260+ founders building real systems.

Join OpenClaw Lab →