Per-tenant Meta Cloud API configuration and diagnostics for /whatsapp.ashx.
This page configures WhatsApp Business API for your tenant. Sign in with an admin OIDC session.
Meta scatters these values across three consoles: developers.facebook.com/apps (the App), business.facebook.com/wa/manage (WhatsApp Manager), and business.facebook.com/settings/system-users (Business Settings). Follow the six steps below in order.
whatsapp_business_messaging + whatsapp_business_management.+4915157610183) from WhatsApp Manager → Phone numbers. The display name is what your chat UI shows above each thread — a short label like “WhatsApp” or “Guest inbox”.
/whatsapp.ashx?action=webhook with hub.mode=subscribe; on success the panel turns green. Then subscribe to the fields listed lower down on this page (messages is the essential one).
X-Hub-Signature-256 header).
Values from App_Data/<tenant>/chat-whatsapp/config.json. Secrets are masked on load and only sent when the field is edited.
Which internal users should see incoming WhatsApp messages in their team chat, and which email addresses receive an extra copy of each inbound message.
/chat.html. Each remote WhatsApp number gets its own group (gc-wa-<E.164 digits>) auto-created on first inbound message. Each checked user's email address (from their tenant profile) also receives a copy of every inbound message automatically — no need to list them below.
Paste these into your Meta App at developers.facebook.com/apps under WhatsApp → Configuration.
While your Meta App is in unpublished / Development mode, Meta will not forward real WhatsApp messages to this webhook — only synthetic events fired from the Meta Dashboard’s Send test webhook button. To receive real customer messages, you need to complete App Review and publish the app (which in turn requires Business Verification). Outbound send is not affected — it works pre-publish as long as the recipient is on the allowed-tester list.
In the Meta App Dashboard → WhatsApp → Configuration → Webhooks, subscribe to these WhatsApp Business Account fields. Only messages is required for the chat bridge; the rest are recommended so operational events (template approvals, quality drops, account alerts) land in the audit log.
| Field | Purpose | Priority | Our handling |
|---|
GET to our webhook with hub.mode=subscribe. If it fails, check the Verify Token above matches character-for-character what you paste in the Meta Dashboard.
Sends a text message via POST /whatsapp.ashx?action=send. Requires Phone Number ID and Access Token to be filled in.
Server-to-server outbound: an external system authenticates with a mint-once API key and POSTs to /whatsapp.ashx?action=send-external to send WhatsApp messages through this tenant's number. Keys are shown in plaintext only at creation — save it into your integration then.
Bind a key to a specific template to drastically shrink the blast radius if the key ever leaks. A bound key can ONLY send that Meta-approved template; free-form text and other templates are refused with 403 template-required or 403 template-mismatch. Leave unset to mint an unrestricted key.
Header: X-CodeB-WhatsApp-API-Key: <plaintext-key>. Body: {to, body} for free-form (open 24-h window only) OR {to, template:{name,language,components}} for template send. to is E.164 (with or without leading +). Response mirrors Meta Graph API delivery status and echoes channel + keyId for correlation. Any auth failure — missing/wrong/revoked key, tenant not configured — returns a uniform 401 unauthorized.
Meta-approved templates are the only way to reach a WhatsApp user OUTSIDE the 24-hour customer service window. Submit here, Meta reviews within minutes-to-hours (Utility & Authentication faster than Marketing). Approved templates appear in chat.html's new-conversation picker automatically.
Caps distinct outbound recipients per calendar day (UTC). Applies uniformly to the WhatsApp API, the external send endpoint, and the in-app new-chat button. Replies to same-day recipients don't consume quota. Set to 0 for unlimited (not recommended when API keys exist).
From the tenant audit log at chat-whatsapp/audit/*.jsonl. Inbound = webhook events from Meta. Outbound = replies you sent.