parseWebhookEvents
parseWebhookEvents(
body,options?):WebhookEvent[]
Defined in: src/resources/webhook-events.ts:142
Parses a webhook delivery into a flat list of typed events, in delivery order.
Accepts the same inputs as parseWebhook: a parsed object or its JSON as a
string, Uint8Array or ArrayBuffer. Fields this SDK does not model, and
known fields whose shape does not match, are returned as unknown events (or
the unknown member of a typed event) instead of throwing. Only an invalid
envelope throws.
statuses under the messages field are message statuses; statuses under
calls are call statuses. Signature verification is not part of this
function; verify the raw body first.
Parameters
Section titled “Parameters”unknown
The delivery body.
options?
Section titled “options?”ParseWebhookOptions = {}
Optional size limit override.
Returns
Section titled “Returns”Throws
Section titled “Throws”WhatsAppWebhookError when the body is not a valid envelope.
Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.