WebhookHandlerConfig
Defined in: src/types/webhooks.ts:518
Configuration for WebhookHandler.
Properties
Section titled “Properties”allowUnsigned?
Section titled “allowUnsigned?”
optionalallowUnsigned?: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.
appSecret?
Section titled “appSecret?”
optionalappSecret?:string| readonlystring[]
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.
maxBodyBytes?
Section titled “maxBodyBytes?”
optionalmaxBodyBytes?: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.
verifyToken?
Section titled “verifyToken?”
optionalverifyToken?: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.