Which “password” does the user mean?
Integrations mix up three different secrets. Identify which one before answering:
The Meta app secret is a fourth value, but it is the user’s own: they copy it from their Meta app and give it to Pilot Status, never the other way around.
1. Choose the credential
- Keys are shown once, when created or regenerated. Lost one? Regenerate it on the same screen — the old value stops working at once. Keys created before 2026-10-28 have the older
ps_+ hex form and still work. - The REST API never takes
Authorization: Bearer. Send the key inx-api-key. Bearer is only for the MCP server’s OAuth. - Keep keys on a server. Never in browser code, a mobile app or a
NEXT_PUBLIC_/VITE_variable.
2. Connect the MCP server
The hosted server exposes the public/v1 API as 151 tools:
describe, execute) instead of 151, with the same credentials and permissions — connect one endpoint or the other, not both:
- Claude (claude.ai / Desktop)
- ChatGPT
- Claude Code
- Cursor and file-configured clients
Settings → Connectors → Add custom connector, paste the URL. claude.ai runs the OAuth login (Pilot Status SSO): no key is pasted. On the consent screen, grant the whole workspace (Owner or Admin only) or specific numbers.
- With a workspace key, account key or whole-workspace OAuth grant, the number tools take a
whatsappNumberIdargument: get it fromnumbers_list. - When unsure how to do something, call the
docs_searchtool with the question or the error code; it returns the most relevant pages of these docs. - Full setup, the tool list and self-hosting: MCP Server · MCP Code Mode.
3. Send a message
- The answer is
202withstatus: "QUEUED"and anid. Keep theid: it is the one the status webhooks andGET /v1/messages/{id}use. - Official (Meta) numbers: free-form
textonly works inside the 24-hour service window. Outside it, send an approved template (templateId+variables), or the message fails withMETA_OUTSIDE_24H_WINDOW. - Use an idempotency key derived from your data, so a retry after a timeout does not send twice.
4. Create a webhook and get the signing secret
A webhook belongs to one number. Every webhook created since 2026-09-15 is signed: it gets a signing secret at creation, and every delivery carriesx-pilot-status-signature.
1
Create it
- Dashboard: Webhooks (
/webhooks) → New Webhook → URL and events. - API:
POST /v1/webhookswith{ "url": "…", "events": ["*"] }(with a workspace key, addwhatsappNumberId). - MCP:
webhooks_create.
events list delivers nothing; "*" means every event (except lead.received, which is opt-in).2
Copy the signing secret — it is shown once
- Dashboard: right after saving, the Signing secret window shows it with a Copy button and the notice “Shown once. Store it now — no read returns it again.” Copy it before clicking Got it.
- API: the
secretfield of the201response ofPOST /v1/webhooks. - MCP: the
secretfield returned bywebhooks_create.
PILOT_STATUS_WEBHOOK_SECRET). No read — GET, list, PATCH, the dashboard later — returns it again; they only say hasSecret.3
Lost it, or the webhook has no secret? Rotate
- Dashboard: open the webhook → Edit Webhook → Generate a new secret → confirm. The new one appears once, in the same Signing secret window.
- API:
POST /v1/webhooks/{id}/rotate-secret→{ "id": "…", "hasSecret": true, "secret": "…" }. - MCP:
webhooks_rotate_secret.
Who can see it. In the dashboard and over OAuth/MCP, webhook secrets go to the workspace Owner and Admin (
webhooks:manage). With a ps_ key that can manage webhooks, the response always carries it. If an OAuth creation answers secret: null with secretWithheld: true, the audit record could not be written: rotate to get a new secret.plwh_… secrets, under Phone lines → Line webhooks or Workspace keys → Webhooks) follow the same “shown once” rule but cannot be rotated: create a new webhook and delete the old one. See Workspace webhooks. WhatsApp Flow endpoints have their own secret: see Flows.
Details: Configure webhooks · Webhooks screen · Event reference.
5. Verify the signature
x-pilot-status-signature is the hex-encoded HMAC-SHA256 of the raw request body, keyed with the signing secret. Compute it over the bytes exactly as received — never over re-serialized JSON — and compare in constant time.
verifyWebhookSignature in Node (@pilot-status/sdk) and verify_webhook_signature(raw_body, signature_header, secret) in Python (pilot-status 1.16.0+). See SDKs.
- Official (Meta) numbers deliver Meta’s native envelope (
{ object, entry }), not themessage.*events of QR-code numbers. Read Which events your number sends before writing the parser. - Deliveries are at least once: deduplicate on
Idempotency-Keywhen present, otherwise on the ids the event reference names.
6. Meta verify token (numbers with your own Meta app)
Only needed when a number is connected through Official Meta API (Cloud API) with the user’s own Meta app credentials and Pilot Status does not route the WABA’s webhooks itself. Numbers connected with Connect with Facebook (Embedded Signup / Coexistence) and QR-code numbers need nothing here.- Dashboard: the Meta Number Created! window, right after connecting, shows the Callback URL and Verify Token with copy buttons. Later, the workspace Owner copies the Verify Token from the number’s expanded card on Numbers; other roles see “Only the workspace owner can view it”.
- API:
POST /v1/numbers/metaanswerswebhook.urlandwebhook.verifyToken. Or passrouteWebhooksToPilot: trueand Pilot Status subscribes the WABA itself (webhook.routedToPilot: true), with no token to paste. - In the Meta app: WhatsApp → Configuration → Webhook, paste the Callback URL and the Verify Token, Verify and save.
7. Templates (official numbers)
Outside the 24-hour window an official number can only start a conversation with an approved template.examplesis required: one real sample for every variable, or400 TEMPLATE_EXAMPLES_REQUIRED.- Over MCP, a media header is accepted by URL only.
- Submit and sync need a Meta Cloud API number (
422 TEMPLATE_REQUIRES_META_NUMBER) and a number-scoped credential. - QR-code (unofficial) numbers have no approval step: their templates are usable immediately.
8. Destructive tools: preview, then token
templates_delete, workspace_archive, workspace_transfer_ownership and workspace_members_remove run in two calls:
- Call without
confirm_token. Nothing changes: the answer isstatus: "CONFIRMATION_REQUIRED", apreviewand a single-useconfirm_tokenvalid for 5 minutes. - Show the preview to the user and wait for an explicit yes. Then call again with the same arguments plus
confirm_token.
CONFIRM_TOKEN_EXPIRED (new preview), CONFIRM_TOKEN_MISMATCH (repeat the exact arguments), CONFIRM_TOKEN_USED (it already ran — do not repeat), CONFIRM_TOKEN_INVALID (new preview). See Confirmation for destructive tools.
9. What only the Owner can do over OAuth
With the OAuth connector the app acts with the user’s current workspace role, read on every call:- API keys —
api_keys_list(reveals number keys) andapi_keys_regenerate_number, and rotating the workspace’s primary key: Owner only. Others get403 OAUTH_SECRET_REQUIRES_OWNER. If the user is not the Owner, ask the Owner to create the key in the dashboard, or use aps_key inx-api-key. - Signing secrets and the Meta verify token — Owner or Admin, like the dashboard.
numbers_purgeand paying a number (numbers_pay) — Owner only.- Archive, transfer ownership, remove a member — Owner only, with the owner’s OAuth token (archive and transfer also accept their account key); a
ps_workspace or number key is refused. - Creating workspaces and named workspace keys (
workspaces_*) — an account key only; OAuth tokens get403 ACCOUNT_KEY_REQUIRED.
10. Common errors
Errors are JSON with a stablecode and a bilingual error (English | Português). Branch on code.
Delivery failures that appear later on the message (
errorCode) are listed in Log Error Codes.
Related
- Using AI/LLMs with Pilot Status —
llms.txtand the credentials only the dashboard shows - AI Agents — webhook-driven bot patterns
- Receive messages
- MCP Server