Skip to content

Meta WhatsApp

The Meta WhatsApp webhook receives delivery status updates and incoming messages from Meta’s WhatsApp Cloud API. It handles both the webhook verification handshake and ongoing event notifications.

POST /api/rpc/webhooks/meta/whatsapp

GET /api/rpc/webhooks/meta/whatsapp

Meta calls the GET endpoint during webhook setup to verify ownership. The platform validates the verify token and returns the challenge.

Query ParameterDescription
hub.modeMust be subscribe
hub.verify_tokenMust match META_WHATSAPP_VERIFY_TOKEN
hub.challengeChallenge string returned as the response

Meta signs webhook requests using HMAC-SHA256.

HeaderDescription
X-Hub-Signature-256sha256=<hmac_hex>

The signature is computed over the raw request body using your app secret. Configure this using the META_WHATSAPP_APP_SECRET environment variable.

Meta StatusPlatform EventDescription
sentwhatsapp_sentMessage sent
deliveredwhatsapp_deliveredMessage delivered to recipient
readwhatsapp_readRecipient read the message
failedwhatsapp_failedMessage failed

Meta sends events in a nested structure. The platform extracts statuses from entry → changes → value → statuses. A single webhook call can contain multiple events.

FieldDescription
conversationIdWhatsApp conversation ID
pricingModelWhatsApp pricing category
Error detailsExtracted from statusData.errors array
{
"success": true,
"processed": 3,
"duplicates": 0,
"errors": 0
}
  1. In the Meta Developer Dashboard, go to your WhatsApp app’s Webhooks configuration.
  2. Set the Callback URL to your platform’s Meta WhatsApp webhook endpoint.
  3. Set the Verify token to a secure random string.
  4. Set these environment variables:
    • META_WHATSAPP_VERIFY_TOKEN — the verify token you chose
    • META_WHATSAPP_APP_SECRET — your WhatsApp app secret from Meta
  5. Subscribe to the messages webhook field.