WhatsApp API Setup for OpenClaw

This guide explains how to set up the WhatsApp API for OpenClaw, connect your WhatsApp account using QR linking, and configure the messaging gateway.

Do not index
notion image
Connecting WhatsApp to OpenClaw is only part of the setup. To make the messaging channel work reliably, OpenClaw also configures what’s called the WhatsApp gateway — the component that handles incoming and outgoing messages between your phone and the OpenClaw agent.
The setup process happens inside the OpenClaw terminal and works through WhatsApp Web linking. Instead of using the official WhatsApp Business API, OpenClaw creates a linked session using a QR code and stores the credentials for future connections.
In this guide, we’ll walk through how the WhatsApp API setup works inside OpenClaw and how to confirm everything is configured correctly.

Step 1 — Open Your OpenClaw Instance

First, log into your Agent37 dashboard.
Then navigate to:
OpenClaw → Instances
You’ll see a list of your OpenClaw instances along with their tier, status, and available credits.
Before starting the setup, confirm that your instance shows:
Status: Running
If it isn’t running, restart the instance first. The messaging gateway cannot initialize if the instance is offline.
Next, click Terminal on the instance you want to configure.

Step 2 — Start the Configuration Wizard

Inside the terminal, run the OpenClaw configuration command:
openclaw configure
This launches the configuration interface inside the terminal.
You’ll see a list of sections that can be configured:
  • Workspace
• Model
• Web tools
• Gateway
• Daemon
• Channels (WhatsApp / Telegram / etc.)
• Skills
• Health check
To configure WhatsApp, move to the Channels section.

Step 3 — Select WhatsApp as the Messaging Channel

Inside the channel configuration screen, OpenClaw displays the supported messaging platforms.
You’ll see options similar to:
  • Telegram (Bot API)
  • WhatsApp (QR Link)
  • Discord (Bot API)
  • Google Chat
  • Slack
  • Signal
  • Matrix
  • LINE
Select:
WhatsApp (QR Link)
This tells OpenClaw that WhatsApp will be used as a messaging interface for your AI agent.
After selecting the channel, the system will ask if you want to link WhatsApp immediately.
Choose:
Yes

Step 4 — Link Your WhatsApp Session

Once confirmed, OpenClaw generates a QR code inside the terminal.
You’ll see a message similar to:
“Waiting for WhatsApp connection…
Scan this QR in WhatsApp (Linked Devices).”
Now open WhatsApp on your phone and follow these steps:
  1. Open WhatsApp
  1. Tap the three-dot menu
  1. Select Linked Devices
  1. Tap Link a Device
  1. Scan the QR code shown in the OpenClaw terminal
When the scan is successful, the terminal will display a confirmation message.
The connection credentials are then stored in the OpenClaw directory so the session can reconnect automatically later.

Step 5 — WhatsApp Gateway Configuration

After the QR scan, OpenClaw sets up the WhatsApp messaging gateway.
The gateway handles:
  • incoming messages from WhatsApp
• outgoing AI responses
• session management
• connection recovery after restart
During setup you may see a message like:
“Credentials saved. Restarting connection once.”
This means the gateway is initializing the WhatsApp session.
Once completed, the system will show something like:
“Linked after restart, web session ready.”
At this point, the WhatsApp API connection is active.

Step 6 — Verify the WhatsApp Connection

After the setup finishes, the terminal will show a message similar to:
“Configure complete.”
Open WhatsApp again and send a test message.
For example:
Hi
If everything is configured correctly, OpenClaw will respond to your message through the linked WhatsApp session.
This confirms that the messaging channel and gateway are working.

Where WhatsApp Credentials Are Stored

When the session is created, OpenClaw saves the connection credentials locally so the session can reconnect automatically.
The credentials are stored in the OpenClaw directory under the WhatsApp channel configuration.
This means you normally do not need to scan the QR code again unless the session expires or is manually reset.

Common Setup Issues

Sometimes the WhatsApp API setup may fail during the first attempt. Most issues are easy to fix.
QR code expired
QR codes expire quickly.
Run the configuration again to generate a new one.
openclaw configure
Then scan the new QR code immediately.

WhatsApp session disconnected
If the session is lost, simply restart the instance and reconnect.
openclaw restart

No response from the agent
Check that:
  • the OpenClaw instance is running
• WhatsApp channel is selected
• the gateway finished initialization

What Happens After Setup

Once WhatsApp API setup is complete, your OpenClaw agent can communicate directly through WhatsApp.
You can now:
  • chat with your AI agent from your phone
• send commands through WhatsApp
• trigger OpenClaw skills
• automate conversations
• manage workflows through messaging
This effectively turns WhatsApp into a front-end interface for your OpenClaw AI system.

Final Thoughts

Setting up WhatsApp for OpenClaw is straightforward once you understand how the connection works. The process mainly involves selecting the WhatsApp channel, scanning the QR code, and allowing OpenClaw to initialize the messaging gateway.
After the first successful connection, the session credentials are stored automatically, which means your OpenClaw agent can reconnect without repeating the setup each time.
Once everything is configured, interacting with your AI agent becomes as simple as sending a message on WhatsApp.