Signature format
TheX-Reap-Webhook-Signature header looks like this:
t is a Unix timestamp (seconds). v1 is the hex-encoded HMAC-SHA256 signature.
How to verify
Build the signed payload
Concatenate timestamp and raw request body with a
. separator: {timestamp}.{raw_body}Compare signatures
Compute HMAC-SHA256 of the signed payload using your secret. Compare the hex digest to
v1 using constant-time comparison.JavaScript example
Express.js example
Capture the raw body before JSON parsing:Security notes
- Always use constant-time comparison (
timingSafeEqual). String equality leaks timing information. - 5 minutes is the recommended timestamp tolerance.
- Keep your signing secret safe. If it leaks, contact the Reap team to rotate it.