Skip to main content
Your endpoint is public, so anyone could post to it. Every delivery from Telleo is signed with your webhook secret; check the signature before you trust the body.

The signature header

  • t: when the delivery was signed, in Unix seconds.
  • v1: the hex HMAC-SHA256 of t + "." + <raw request body>, keyed with your webhook secret.
To verify:
  1. Read the raw request body, exactly as received. Do not parse and re-serialise the JSON first: any change in spacing or key order changes the signature.
  2. Compute HMAC-SHA256(secret, t + "." + raw_body) as lowercase hex.
  3. Compare it with v1 using a constant-time comparison.
  4. Reject the request if t is more than 5 minutes from your clock. This stops someone replaying an old delivery.

Examples

Rotating the secret

New secret in the dashboard, or POST /v1/webhook/rotate-secret, returns a new secret once and signs every later delivery with it. To rotate without failing deliveries:
  1. Make your endpoint accept a signature made with either the old or the new secret.
  2. Rotate, and store the new secret.
  3. After a few minutes, remove the old secret.

Other headers