Table of Contents
- What You Need Before You Connect WhatsApp to OpenClaw
- Step 1: Create and Open Your OpenClaw Instance
- Step 2: Open the Terminal
- Step 3: Run the Configuration Wizard
- Step 4: Set the Gateway to Local
- Step 5: Select the WhatsApp Channel
- Step 6: Scan the QR Code from Your Phone
- Step 7: Finish the Phone Number Setup
- Step 8: Send a Test Message
- How the WhatsApp Connection Works Under the Hood
- Where WhatsApp Credentials Are Stored
- Quick Fixes When the Connection Fails
- The QR code expired
- Your camera will not scan the code
- WhatsApp linked, but the bot never replies
- What You Can Do Once WhatsApp Is Connected
- What It Costs to Run
- Common Questions
- Do I need the WhatsApp Business API to connect WhatsApp to OpenClaw?
- Will the connection survive a restart?
- Can I use my personal number?
- Can I connect other chat apps the same way?
- Watch the Video Walkthrough
- Get Your WhatsApp Bot Live Today
Do not index

You can connect WhatsApp to OpenClaw in about ten minutes, without the WhatsApp Business API, without a Meta developer account, and without writing a line of code. OpenClaw links to WhatsApp the same way WhatsApp Web does: you scan a QR code, the session is saved, and from then on your AI agent answers you inside the chat app you already open fifty times a day.
Here is the short version. Open your OpenClaw instance, run
openclaw configure in the terminal, set the gateway to Local, pick WhatsApp (QR Link) from the channel menu, scan the QR with your phone, confirm your number, and send yourself a test message. That is the whole job. The rest of this guide walks through every prompt you will see, in order, plus the fixes for the three failures that stop most people: an expired QR code, a camera that refuses to scan, and a bot that links but never replies.One note before we start. OpenClaw is free, open source software. Nobody charges you for the agent itself. What you pay for is model API usage and somewhere always-on to run it, because a bot that dies when your laptop sleeps is not much of a bot. More on the exact costs at the end.
What You Need Before You Connect WhatsApp to OpenClaw
Three things, all simple:
- A running OpenClaw instance. This guide uses a managed instance on Agent37, which gives you a browser terminal and stays online around the clock. A self-hosted install works the same way once you reach a terminal.
- WhatsApp installed on your phone, with an active number. The QR pairing links that account to OpenClaw as a device, exactly like linking a laptop to WhatsApp Web.
- About ten minutes. The linking itself takes under two. The rest is the wizard walking you through prompts.
There is also one decision to make now: personal number or dedicated number. Linking your personal WhatsApp is fine for testing and personal assistant use. If you plan to run automation, customer-facing replies, or anything that sends messages in volume, a separate number on a cheap SIM is the safer play. The wizard will ask you this later, so decide before you start.
Step 1: Create and Open Your OpenClaw Instance
Log in to the Agent37 dashboard at www.agent37.com/dashboard. If you do not have an account yet, create one and pick a plan. Managed instances start at $3.99 per month, and each one runs in its own isolated container with a full web terminal.
Once you are in:
- Click Launch Agent (the button reads Create Agent if you already have one).
- Wait for provisioning to finish. This usually takes under a minute.
- Open the new instance from your dashboard.
Already have an instance? Open Agents in your dashboard and check the status column. It must say running before WhatsApp will connect.
Step 2: Open the Terminal
Click into your instance and select Terminal. This opens a command line inside your browser. Everything else in this guide happens here. No SSH keys, no local install, just a shell that is already connected to your OpenClaw runtime.
Step 3: Run the Configuration Wizard
In the terminal, run:
openclaw configureThe OpenClaw configuration wizard opens inside the terminal. You will see a menu of sections similar to this:
- Workspace
- Model
- Web tools
- Gateway
- Daemon
- Channels (Link WhatsApp, Telegram, etc.)
- Skills
- Health check
- Continue
Use the arrow keys to move and Enter to select. Choose Channels. This is the section that connects messaging platforms such as WhatsApp, Telegram, Discord, Slack, and Signal to your agent.
Step 4: Set the Gateway to Local
When the wizard asks where the gateway will run, select Local. The gateway is the process that holds your WhatsApp session and routes messages to your agent, and Local means it runs on the instance you are configuring right now. That is what you want. Pointing the gateway anywhere else at this stage adds a networking problem you do not need.
Next, when the wizard asks which section to configure, pick Channel, then choose Configure / Link.
Step 5: Select the WhatsApp Channel
The channel menu lists every messaging platform OpenClaw supports:
- Telegram (Bot API)
- WhatsApp (QR Link)
- Discord (Bot API)
- Google Chat
- Slack
- Signal
- Matrix
- LINE
- Zalo
Select WhatsApp (QR Link). The wizard then asks:
Link WhatsApp now (QR)? Choose Yes.A note on that menu label, for anyone who landed here searching for a WhatsApp API setup for OpenClaw: there is no separate API configuration. OpenClaw connects through WhatsApp Web QR linking, not the official WhatsApp Business API, so selecting WhatsApp (QR Link) and scanning the code is the entire setup.
Step 6: Scan the QR Code from Your Phone
OpenClaw now generates a QR code directly in the terminal, along with a message like
Waiting for WhatsApp connection... Scan this QR in WhatsApp (Linked Devices).Grab your phone and move quickly, because the code expires fast:
- Open WhatsApp.
- Tap the three-dot menu on Android, or Settings on iPhone.
- Select Linked Devices.
- Tap Link a Device.
- Scan the QR code shown in your terminal.
When the scan succeeds, the terminal prints a confirmation along the lines of
Linked after restart, web session ready. Your WhatsApp account is now paired with OpenClaw as a linked device.If the terminal shows
Credentials saved. Restarting connection once. before that line, nothing is wrong. That message means OpenClaw is initializing the WhatsApp gateway, the component that handles incoming messages from WhatsApp, outgoing AI responses, session management, and connection recovery after a restart. The gateway restarts the link once to pick up your new credentials, then settles into a ready state on its own.Step 7: Finish the Phone Number Setup
The wizard asks one more round of questions about the number you just linked. First it offers two options:
- This is my personal phone number
- Separate phone just for OpenClaw
Pick the one that matches the decision you made earlier. Personal is fine for most users. Separate is the recommendation for production bots and heavy automation.
Then enter your phone number when prompted. Type the exact number attached to the WhatsApp account you scanned with, including country code. A mismatched number here is one of the most common reasons a bot later fails to respond.
Navigate to Finish, then select Continue. The wizard writes your settings and confirms with
Updated ~/.openclaw/openclaw.json followed by Configure complete.You may also see gateway details such as
Web UI: http://127.0.0.1:18789 and Gateway: reachable. The reachable line is the one that matters: it means the process holding your WhatsApp session is up.Step 8: Send a Test Message
Open WhatsApp on your phone. Search for your own number, start the chat, and send something simple, like
Hi.If everything is wired correctly, your OpenClaw agent replies right there in the chat within a few seconds. That reply is the finish line. Your AI agent is now live on WhatsApp, and it stays connected across restarts because the session credentials are stored and reused automatically.
How the WhatsApp Connection Works Under the Hood
OpenClaw talks to WhatsApp through the WhatsApp Web protocol. The QR scan registers your instance as a linked device on your account, the same mechanism your browser uses at web.whatsapp.com. That design has three practical consequences:
- No WhatsApp Business API required. There is no Meta app review, no webhook infrastructure, and no per-conversation pricing.
- Your existing WhatsApp account works as is. You do not create a bot account or register anything.
- The session persists. OpenClaw stores the credentials and reconnects automatically, so you scan once, not every morning.
The trade-off is the same one WhatsApp Web has: your account holds a limited number of linked devices, and sessions can occasionally drop. For a personal assistant this rarely matters. For customer-facing automation at scale, that is the main reason to run the bot on a dedicated number instead of your personal one.
Where WhatsApp Credentials Are Stored
After the first successful scan, OpenClaw saves the session credentials inside its own directory, under the WhatsApp channel configuration. That stored session is what the gateway loads on every reconnect, which is why you never rescan the QR after a routine restart. A fresh scan is only needed when the session expires or gets reset, for example when you remove the bot from your phone's Linked Devices list.
Quick Fixes When the Connection Fails
Three failures cover almost every setup problem. Here they are, with the fix for each.
The QR code expired
QR codes are short-lived by design. Run
openclaw configure again, or use the faster openclaw channels login, then scan the fresh code immediately. Have your phone already sitting on the Link a Device screen before you regenerate.Your camera will not scan the code
- Increase your screen brightness.
- Zoom the terminal out slightly so the full code fits on screen.
- Regenerate the QR and try again with the phone a little farther from the screen.
WhatsApp linked, but the bot never replies
This is almost always the gateway. The link succeeded, but the process that routes messages is not running. Restart the instance from the Agent37 dashboard, then send another test message.
Hitting something stranger, like session drops, repeated relinking, or messages that arrive minutes late? We keep a full list in Common WhatsApp Integration Errors and Fixes, covering the failure modes that do not fit in a quick-fix list.
What You Can Do Once WhatsApp Is Connected
The setup is the boring part. Here is what it unlocks:
- Chat with your AI agent from your phone, anywhere, with no dashboard open.
- Automate replies so routine questions get answered while you sleep.
- Trigger OpenClaw skills by message, from research tasks to scheduled jobs.
- Send commands to your agent the way you would text a coworker.
- Manage long-running tasks remotely and have results pushed back into the chat.
In practice, WhatsApp becomes the interface for your agent. The terminal was for setup. From here on, the conversation is the product.
What It Costs to Run
The honest math, since pricing pages tend to bury it: OpenClaw is free software. Your real costs are two:
- Model API usage. You bring your own key for the model provider you choose, and you pay them directly for the tokens your agent consumes.
- Somewhere always-on to run it. A WhatsApp bot only answers while its instance is awake, so it needs a machine that never sleeps.
You can self-host on hardware at home and pay only for electricity, if you are happy maintaining it. Managed hosting on Agent37 starts at $3.99 per month for an isolated container with a web terminal and 1,000+ app integrations through Composio. There is no free tier today, so the cheapest way in is that four dollars.
Common Questions
Do I need the WhatsApp Business API to connect WhatsApp to OpenClaw?
No. OpenClaw connects through the WhatsApp Web protocol with a normal account: the QR scan links your instance as a device, and that is the whole integration. The official WhatsApp Business API is a separate Meta product for verified senders and high message volume, and nothing in this setup requires it.
Will the connection survive a restart?
Yes. OpenClaw saves the session credentials after the first scan and reconnects automatically. You only rescan if the session is revoked or you unlink the device from your phone.
Can I use my personal number?
Yes, and the wizard has a dedicated option for it. Reserve a separate number for production automation or anything customer-facing.
Can I connect other chat apps the same way?
Yes. The same Channels menu links Telegram, Discord, Slack, Signal, Matrix, LINE, and Zalo, so one agent can answer you on every app you use.
Watch the Video Walkthrough
Prefer to watch the whole flow before you run it? The full setup video covers every step above, from dashboard to first reply: Setting Up WhatsApp for OpenClaw.
Get Your WhatsApp Bot Live Today
You now have the complete path: create an instance, run
openclaw configure, set the gateway to Local, pick WhatsApp (QR Link), scan, confirm your number, and test. Ten minutes of setup buys you an AI agent that lives in your pocket.The fastest way to get the always-on part handled is Agent37: your OpenClaw instance deploys in one click, stays online 24/7, and starts from $3.99/mo. Building on the API instead? Agent37 Cloud gives you the same always-on instances behind a single API call. Deploy the instance, scan the QR, and text your agent.