Skip to Content

Verifying signatures

Validate Standard Webhooks signatures on HTTP endpoints.

HTTP webhooks are signed with your endpoint’s whsec_… secret using the Standard Webhooks scheme.

Headers

HeaderPurpose
Webhook-IdUnique delivery id
Webhook-TimestampUnix timestamp (seconds)
Webhook-SignatureOne or more v1,<base64> signatures

Verification steps

  1. Read the raw request body bytes (do not re-serialize JSON first).
  2. Build the signed content: {webhook-id}.{webhook-timestamp}.{body}.
  3. Compute HMAC-SHA256 with the secret (after decoding the whsec_ prefix per Standard Webhooks).
  4. Compare to each v1 signature using a constant-time compare.
  5. Reject if the timestamp is too old (Standard Webhooks libraries typically allow a few minutes of skew).

Prefer an official Standard Webhooks SDK for your language rather than hand-rolling crypto.

Security checklist

  • Serve HTTPS only.
  • Keep the signing secret server-side.
  • Rotate by creating a new webhook, cutting traffic over, then deleting the old one.
  • Treat Discord/Teams endpoints as unauthenticated message sinks; they do not use whsec_ signatures.

On this page