Library referenceFunctions
verifyWebhook()
function verifyWebhook(
rawBody,
signatureHeader,
secret,
options?
): Promise<boolean>;true when the delivery was signed with the endpoint's secret and is not older than the tolerance. the body has to be the raw request body, re-serialized json gives a different signature. answer 401 when this is false, the signature check sends deliberately bad signatures and expects that
Parameters
| Parameter | Type |
|---|---|
rawBody | string | Uint8Array<ArrayBufferLike> |
signatureHeader | string | null | undefined |
secret | string |
options? | VerifyWebhookOptions |
Returns
Promise<boolean>