> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hookmyapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw

> Connect an OpenClaw agent to WhatsApp through HookMyApp.

## What you need

* A HookMyApp account with a connected WhatsApp channel (the sandbox works)
* OpenClaw >= 2026.7.1-2 and Node >= 20
* The HookMyApp CLI: `npm install -g @gethookmyapp/cli`

## Install

```bash theme={null}
openclaw plugins install clawhub:@gethookmyapp/openclaw
```

If the ClawHub registry is unavailable, install straight from npm instead:
`npm pack @gethookmyapp/openclaw && openclaw plugins install npm-pack:./gethookmyapp-openclaw-0.1.0.tgz`.

## Set up

Authenticate the HookMyApp CLI first — setup assumes a logged-in CLI:

```bash theme={null}
hookmyapp login
```

```bash theme={null}
openclaw hookmyapp-whatsapp setup --channel <channel> --write-config --allow-from +15551234567
```

Replace `+15551234567` with the WhatsApp number that should reach your agent.
The setup command pulls the channel credentials through the HookMyApp CLI and
writes them into your OpenClaw config. Secrets are marked sensitive, so
OpenClaw masks them in config displays and exports.

## Receive messages

Two transports; signatures are verified identically in both.

**No public URL (default):** keep this running next to your gateway:

```bash theme={null}
hookmyapp channels listen <channel> --port <openclaw-gateway-port> --path /hookmyapp/webhook
```

**Your own HTTPS endpoint (servers):**

```bash theme={null}
hookmyapp channels webhook set <channel> --url https://your-host/hookmyapp/webhook
```

## Env values

The setup command reads these values from `hookmyapp channels env <channel>`:

| Value                      | What it is                                     |
| -------------------------- | ---------------------------------------------- |
| `HOOKMYAPP_CHANNEL_ID`     | Your HookMyApp channel id                      |
| `META_GRAPH_API_URL`       | The URL your replies are sent through          |
| `WHATSAPP_ACCESS_TOKEN`    | Channel token for sending                      |
| `WHATSAPP_PHONE_NUMBER_ID` | The number your agent sends from               |
| `WEBHOOK_HMAC_SECRET`      | Verifies incoming message signatures           |
| `VERIFY_TOKEN`             | Answers HookMyApp's webhook verification probe |

You never handle them by hand — `setup --write-config` stores them in your
OpenClaw config (secrets marked sensitive).

## Send and receive

Message your WhatsApp number from an allowlisted phone. The gateway logs the
inbound message and your agent replies in the same chat through OpenClaw's
normal message loop — there is no separate HookMyApp send command to run.

## Security

Every delivery is signed with `X-HookMyApp-Signature-256`, and the plugin
rejects anything unsigned or mis-signed with a 401 — there is no way to turn
verification off. Senders are allowlisted by default: unless you pass
`--allow-from <numbers>` during setup or enable `--dm-security open`
(development only), no senders are permitted. Verification probes from
HookMyApp (marked `X-HookMyApp-Probe`) are answered automatically.

## Diagnostics

```bash theme={null}
openclaw hookmyapp-whatsapp doctor        # config, token, HMAC secret, verify token, webhook registration
openclaw hookmyapp-whatsapp doctor --json # machine-readable
```

Pass `--account <id>` to check a named account. Watch the terminal running
`channels listen` for 401s (an HMAC mismatch), or check the HookMyApp
Deliveries panel for the full inbound/forwarded/response chain.

## Media limits

Inbound images and documents are fetched through your channel's media
endpoint and handed to the agent (up to 16 MB per file). Voice notes are
attached as audio; the plugin does not transcribe them in this version.
Outbound media is sent by URL.

## Troubleshooting

**Deliveries return 401.** The channel secret in your OpenClaw config does
not match the channel. Re-run `openclaw hookmyapp-whatsapp setup --channel <channel> --write-config`, then `doctor`.

**Deliveries return 404.** The webhook path has an account suffix the plugin
does not know. Check the path in `channels webhook set` (or your `channels
listen --path`) against `doctor`'s account list.

**`channels listen` exited on its own.** A webhook URL set in the HookMyApp
dashboard takes precedence over the CLI listener. Clear it with `hookmyapp
channels webhook clear <channel>` and start `listen` again.

**Plugin refuses to load.** Your OpenClaw is older than 2026.7.1-2. Upgrade
OpenClaw or install a plugin version matching your gateway.

## Source

* Plugin source: [https://github.com/hookmyapp/openclaw-plugin](https://github.com/hookmyapp/openclaw-plugin)
* Package: `@gethookmyapp/openclaw@0.1.0` (npm + ClawHub)
