Skip to main content
Blujay signs every webhook with your subscription’s signing secret, following the Standard Webhooks specification. Verify the signature before you trust a request.

The headers

How the signature is made

  1. Take the secret after the whsec_ prefix and base64-decode it. Those bytes are the HMAC key.
  2. Build the signed content: {webhook-id}.{webhook-timestamp}.{raw body}.
  3. Compute HMAC-SHA256 of that content and base64-encode it.
  4. The header value is v1, followed by that string.
To verify, compute the same value and compare it with each v1, entry in the header using a constant-time comparison. Also reject a webhook-timestamp more than five minutes away from your clock, so an old request can’t be replayed.

The four details that must be exact

Use the raw request body, byte for byte. Parsing the JSON and serializing it again changes the bytes and breaks the signature.

Code

Use a library

Because Blujay follows the Standard Webhooks specification, the Standard Webhooks libraries verify Blujay signatures unchanged. For example, with the standardwebhooks package for Node.js:
Standard Webhooks libraries exist for many languages, including Python, Go, Ruby, PHP, Java and C#. See standardwebhooks.com.

Troubleshooting

Limitations

  • One signing scheme: symmetric HMAC-SHA256 as v1. There is no public-key signature.
  • One secret per subscription, shown once. There is no endpoint to rotate it in place; create a new subscription to change it.
  • No source IP range is published, so the signature is your only proof of origin.

Next steps

Events

Every event type and its payload.

Delivery and retries

What happens when your endpoint is down.