Skip to content

API keys ​

Every API request needs a key. Create one per app or integration, so you can see which one is used and revoke it on its own.

API keys

Creating a key ​

API Keys → New key (admins only), enter a name and copy the key (wag_…). It is shown only once; the gateway stores just a hash of it. Lost a key? Revoke it and create a new one.

The list shows the start and end of each key, who created it and when it was last used.

Using a key ​

Send it in the key header:

bash
curl http://YOUR_SERVER:5001/session -H "key: wag_your_key"

x-api-key: wag_… and the ?key=wag_… query parameter work too, for tools that can't set custom headers.

Revoking a key ​

Click Revoke next to the key. Requests with that key fail with 401 Unauthorized immediately.

The KEY environment variable ​

v4 used a single key from the KEY environment variable. It is still accepted next to dashboard keys, and shows up in the audit log as KEY (env). Prefer dashboard keys: they can be revoked without a restart.

Uses the unofficial WhatsApp Web protocol. Not affiliated with WhatsApp or Meta.