Skip to main content
Every webhook delivery is signed using the secret_key returned at webhook creation time. Verify the signature on your server before acting on the payload.

How signing works

BugSmash signs each delivery using HMAC-SHA256 over a string that combines the timestamp and the raw JSON payload:
The resulting hex-encoded signature is sent in the X-BugSmash-Signature header. The Unix timestamp used during signing is sent in the X-Webhook-Timestamp header.
Always compare signatures using a constant-time function (e.g. crypto.timingSafeEqual in Node.js) to avoid timing attacks.

Request headers BugSmash sends

string
Unix timestamp (in seconds) of when the payload was signed.
string
Hex-encoded HMAC-SHA256 signature.

Verifying the signature

Node.js
Some frameworks reformat the JSON body before it reaches your handler, which changes the bytes and invalidates the signature. If verification fails unexpectedly, sign against the raw request body rather than a re-serialized object.

Replay protection

The X-Webhook-Timestamp header lets you reject deliveries that are too old. A common rule is to ignore any request older than five minutes: