Signature verification
Verify that a webhook came from Reventlov.
Every webhook request includes an HMAC-SHA256 signature header:
tis the Unix timestamp when we signedv1ishmac_sha256(secret, t + "." + raw_body)
The secret is the value you received when creating the endpoint via
POST /v1/webhook-endpoints. Store it somewhere you can reach from the webhook
handler; we never show it again.
Verify in Node
Verify in Python
Rules
- Always use the raw request body (bytes before any JSON parsing)
- Reject timestamps older than 5 minutes — prevents replay attacks
- Always use a timing-safe comparison
- If the signature fails, respond
401and do not process the event