Verifies an OpenSeat webhook and returns its parsed body. Pass the RAW request body (the exact bytes OpenSeat sent: express.raw({ type: "application/json" }), or await request.text()), never re-serialised JSON. During a secret rotation pass both secrets; any one matching any v1 is enough. Throws OpenSeatWebhookError.
function verifyWebhook(
rawBody: string | Uint8Array,
signatureHeader: string | null | undefined,
secret: string | readonly string[],
o?: VerifyWebhookOptions,
): Promise<OpenSeatWebhookEvent>;Parameters
| Parameter | Type | Description |
|---|---|---|
rawBody | string | Uint8Array | |
signatureHeader | string | null | undefined | |
secret | string | readonly string[] | |
ooptional | VerifyWebhookOptions | Default |
Returns
Promise<OpenSeatWebhookEvent>@openseat/node/src/webhooks.ts