Verifying Webhook Signatures

Allternit signs every webhook delivery with HMAC-SHA256. Verify the signature to ensure the payload came from Allternit.

Headers

  • X-Allternit-Signaturesha256=<hex>
  • X-Allternit-Request-Id — unique delivery ID

TypeScript example

Python example

Best practices

  • Use a constant-time comparison function.
  • Reject payloads with mismatched signatures.
  • Store the webhook secret in Allternit Vault or your own KMS.