Skip to content

WebhookHandlerConfig

Defined in: src/types/webhooks.ts:518

Configuration for WebhookHandler.

optional allowUnsigned?: boolean

Defined in: src/types/webhooks.ts:530

Set to true to accept unsigned deliveries without the one-time process warning. Only relevant when no appSecret is configured; with a secret the signature is always required.


optional appSecret?: string | readonly string[]

Defined in: src/types/webhooks.ts:524

App Secret used to verify the X-Hub-Signature-256 header. Pass an array to accept several secrets at once, for example the old and new secret while rotating.


optional maxBodyBytes?: number | false

Defined in: src/types/webhooks.ts:539

Maximum accepted raw body size in bytes for WebhookHandler.parse. Larger bodies throw WhatsAppWebhookError before any hashing or parsing. Defaults to 3 MiB, Meta’s documented maximum payload size. Pass false to disable the check.


optional verifyToken?: string

Defined in: src/types/webhooks.ts:532

Verify token used during the GET verification handshake.

Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.