#adding Whatsapp

1 messages · Page 1 of 1 (latest)

ember ridgeBOT
#

Yep — WhatsApp is linked through WhatsApp Web QR pairing.

Recommended setup is a separate WhatsApp number for OpenClaw, so your personal WhatsApp inbox doesn’t all become agent input.

Quick path:

openclaw channels login --channel whatsapp

Scan the QR from WhatsApp on the phone/number you want OpenClaw to use.

Then make sure your config only allows your number to talk to it, e.g. ~/.openclaw/openclaw.json:

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

Replace that with your phone number in E.164 format. Then start/restart the gateway:

openclaw gateway

If you use pairing mode instead of allowlist, message the assistant number once, then approve:

#

That failure is the key bit:

npm error syscall spawn git
npm error path git
npm error errno -4058

On Windows, the WhatsApp plugin install needs Git on PATH because one of its dependencies is fetched from a git URL.

Fix:

winget install --id Git.Git -e

Then close and reopen PowerShell/Terminal so PATH refreshes, and run:

#
openclaw plugins install @openclaw/whatsapp
openclaw channels login --channel whatsapp

If git --version still fails after installing, Git didn’t get added to PATH. Reinstall Git for Windows and make sure the option to add Git to PATH is enabled.

Docs: https://docs.openclaw.ai/channels/whatsapp

#

Ah — don’t type the npm error ... lines 🙂 Those were just error log lines, not commands.

Run this command instead:

winget install --id Git.Git -e

Then close PowerShell completely, open it again, and check:

git --version

If that prints a Git version, rerun:

#
openclaw plugins install @openclaw/whatsapp
openclaw channels login --channel whatsapp

The reason: npm is trying to install the WhatsApp plugin, but Windows can’t find git.exe yet.

#

Good news: the WhatsApp side looks linked âś…

The remaining problem is local gateway control: 1006 abnormal closure means the CLI couldn’t talk to the running gateway after saving the WhatsApp auth. Usually the gateway is stopped, crashed, or still restarting.

Try this from a fresh PowerShell:

openclaw gateway restart
openclaw gateway status

Then test WhatsApp by messaging the linked WhatsApp number from your allowed phone.

If gateway restart doesn’t work on your setup, start it manually and leave that window open:

#
openclaw gateway

If it still fails, paste the output of:

openclaw status --all

That report redacts secrets, so it’s the useful next diagnostic. Also check your config has your sender number allowed, something like:

channels: {
  whatsapp: {
    dmPolicy: "allowlist",
amber breach
#

how to chat with openclaw

ember ridgeBOT
#

Once WhatsApp is linked and the gateway is running, you chat with OpenClaw by messaging the WhatsApp number you linked to OpenClaw.

So the flow is:

  1. Start/restart the gateway:
openclaw gateway restart

or manually:

openclaw gateway
  1. From your normal WhatsApp account, send a message to the OpenClaw/assistant WhatsApp number.
#
  1. Make sure your number is allowed in C:\Users\Somegh\.openclaw\openclaw.json, for example:
{
  channels: {
    whatsapp: {
      dmPolicy: "allowlist",
      allowFrom: ["+YOUR_PHONE_NUMBER"]
    }
  }
}

Use full international format, like +15551234567.

If you linked your personal WhatsApp number instead of a second assistant number, you may need to message yourself / use the self-chat mode, but the recommended setup is a separate assistant number.

amber breach
#

i need ot make it like when a certain numebr message it shoudl give reply

ember ridgeBOT
#

Yep — that’s exactly what allowFrom / dmPolicy is for.

Edit this file:

notepad C:\Users\Somegh\.openclaw\openclaw.json

Set WhatsApp to allow only that phone number:

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

Replace +15551234567 with the number that should be allowed to talk to OpenClaw. Use full international format, with + and country code.

Then restart the gateway:

openclaw gateway restart

Now when that number messages your linked WhatsApp/OpenClaw number, OpenClaw should reply. Other numbers should be ignored/blocked.

If you want multiple allowed people:

amber breach
#

no reply coming

ember ridgeBOT
#

Okay — if WhatsApp is linked but no reply comes, check these in order:

  1. Is the gateway actually running?
openclaw gateway status

If not running:

openclaw gateway

Leave that window open.

  1. Check channel health/logs:
#
openclaw status --all
  1. Make sure the sender number exactly matches allowFrom in international format:
channels: {
  whatsapp: {
    dmPolicy: "allowlist",
    allowFrom: ["+YOURNUMBER"]
  }
}

Common mistake: missing country code, spaces/dashes, or using the assistant number instead of the number that is messaging it.

#
  1. If you used pairing mode, approve the sender:
openclaw pairing list whatsapp
openclaw pairing approve whatsapp <CODE>
  1. Restart after config changes:
openclaw gateway restart

If it still doesn’t reply, paste the output of:

#
openclaw status --all

That’s the fastest way to see whether WhatsApp is connected, whether messages are being ignored by policy, or whether the model/auth side is failing.

amber breach
#

how to pair

ember ridgeBOT
#

To pair/approve a WhatsApp sender, first have that phone number send a message to your OpenClaw WhatsApp number.

Then run:

openclaw pairing list whatsapp

You’ll see a pending code/request. Approve it with:

openclaw pairing approve whatsapp <CODE>

Example:

#
openclaw pairing approve whatsapp ABC123

Then restart if needed:

openclaw gateway restart

If pairing list shows nothing, either the message didn’t reach the linked WhatsApp session, the gateway isn’t running, or your config is using dmPolicy: "allowlist" instead of pairing mode.

For pairing mode, config should look like:

channels: {
#
  whatsapp: {
    dmPolicy: "pairing"
  }
}
amber breach
#

No pending whatsapp pairing requests.

ember ridgeBOT
#

That means OpenClaw didn’t create a pairing request. Most likely one of these is true:

  1. Your config is not in pairing mode
  2. The gateway wasn’t running when the WhatsApp message arrived
  3. The message went to the wrong WhatsApp number/session
  4. The sender is already allowed/blocked by allowFrom policy instead of pairing

If you want pairing, set this in C:\Users\Somegh\.openclaw\openclaw.json:

{
  channels: {
    whatsapp: {
      dmPolicy: "pairing"
    }
  }
#
}

Then restart and keep gateway running:

openclaw gateway restart
openclaw gateway status

Now send a fresh WhatsApp message from the phone you want to approve, then run:

openclaw pairing list whatsapp