Function: verify()
verify(
secret,signature,body):boolean
Defined in: rest/v2/webhooks/verify.ts:15
Verify an incoming webhook request
Parameters
| Parameter | Type | Description |
|---|---|---|
secret | string | The webhook secret. Can be found in the portal or in the API response for client webhooks |
signature | null | string | The signature of the request. Can be found in the request headers |
body | string | The raw request body |
Returns
boolean
whether the signature is valid for the associated body
Throws
if no secret is given