← Back to Plugins
Channels

Whatsapp Business Api

mihainasaudeandp By mihainasaudeandp 👁 61 views ▲ 0 votes

WhatsApp Business Platform (Cloud API) channel plugin for OpenClaw. Native sessions, Meta webhook signature verification, guided setup wizard.

GitHub

Install

npm install
#

README

# OpenClaw WhatsApp Business API Plugin

WhatsApp Business Platform (Cloud API) channel plugin for OpenClaw.
Replaces the built-in Baileys/WhatsApp Web channel with Meta's official Cloud API.

## Features
- Native OpenClaw sessions with persistent memory per phone number
- Meta webhook signature verification (X-Hub-Signature-256)
- Guided setup wizard (`openclaw configure --section channels`)
- CLI validation commands (`openclaw whatsapp-business-api full-check`)
- Immune to OpenClaw updates (lives outside `npm -g`'s package tree)
- Message chunking to Meta's 4096-character text limit

## Prerequisites
- OpenClaw installed and running
- Meta Developer account + Meta App with the WhatsApp product added
- Registered WhatsApp Business phone number
- System User access token with `whatsapp_business_messaging` permission

## Installation

```bash
git clone https://github.com/digitalpartners/openclaw-whatsapp-business-api.git ~/openclaw-plugins/whatsapp-business-api
cd ~/openclaw-plugins/whatsapp-business-api
npm install
# Link your local OpenClaw install so TypeScript can resolve openclaw/plugin-sdk/*
# (only needed to build; not required at runtime)
npm install --no-save "openclaw@file:$(npm root -g)/openclaw"
npm run build
# Drop node_modules before installing — the plugin installer's safety scan
# rejects the local openclaw symlink left behind by the build step above.
rm -rf node_modules package-lock.json
openclaw plugins install ~/openclaw-plugins/whatsapp-business-api
systemctl --user restart openclaw-gateway
```

## Configuration

Run the guided setup wizard:

```bash
openclaw configure --section channels
```

Or configure manually via `openclaw config set channels.whatsapp-business-api.<field> <value>` / the Control UI's channel config form. Required fields: `accessToken`, `phoneNumberId`, `appSecret`, `verifyToken`. See `openclaw config schema` for the full field reference (each field has a description pointing at the exact Meta dashboard location).

Point Meta's webhook (App Dashboard → WhatsApp → Configuration) at:

```
https://<your-gateway-host>/webhooks/whatsapp-business-api
```

using the `verifyToken` value from your config, then subscribe to the `messages` webhook field.

## Validation

```bash
openclaw whatsapp-business-api validate-token
openclaw whatsapp-business-api validate-phone
openclaw whatsapp-business-api validate-waba
openclaw whatsapp-business-api test-webhook
openclaw whatsapp-business-api full-check
openclaw whatsapp-business-api send-test "+40744682865"
```

## After OpenClaw Updates

The plugin lives outside `npm -g`'s package tree, so `npm update -g openclaw` never touches it directly. What it *can* break is `openclaw/plugin-sdk/*`, an internal API surface not guaranteed stable across versions.

If the plugin breaks after an OpenClaw update:

```bash
cd ~/openclaw-plugins/whatsapp-business-api
npm install
npm install --no-save "openclaw@file:$(npm root -g)/openclaw"
npm run build
rm -rf node_modules package-lock.json
openclaw plugins install ~/openclaw-plugins/whatsapp-business-api --force
systemctl --user restart openclaw-gateway
openclaw plugins doctor
```

If `npm run build` fails with real TypeScript errors, that means the SDK shape actually changed — fix those against the new types before reinstalling.

## License

Proprietary — Digital Partners
channels

Comments

Sign in to leave a comment

Loading comments...