Skip to main content

Why verify signatures

Without verification, any server that discovers your webhook URL could send fake events. Inbox signs every webhook delivery with your signing secret so you can confirm it’s authentic before processing.

How it works

Every webhook request includes an X-Inbox-Signature header with a timestamp and HMAC-SHA256 signature:
The signature is computed over the timestamp and raw request body joined by a dot:
This format prevents replay attacks — the timestamp is part of the signed payload, so an attacker can’t reuse a captured signature with a different body or at a different time.

Getting your signing secret

  1. Go to Settings → Webhooks in your Inbox dashboard
  2. Click on a webhook configuration
  3. Copy the Signing secret
Store it securely as an environment variable:

Verification steps

Code examples

Full handler example

Make sure you verify against the raw request body string, not a re-serialized version. Parsing the JSON and re-serializing it may change whitespace or key ordering, which will produce a different signature.

Common mistakes

Rotating your signing secret

You can rotate your signing secret at any time from Settings → Webhooks. When you rotate:
  1. The old secret is immediately invalidated
  2. All subsequent deliveries use the new secret
  3. Update your verification code with the new secret before rotating, or accept a brief window of failed verifications