Idenfy-Signature header containing an HMAC-SHA256 digest of the raw HTTP body. By validating this signature on your server you can confirm that the payload was sent by iDenfy and has not been tampered with in transit.
How it works
Set a signing key
In the iDenfy dashboard, navigate to Settings → Notifications → Headers and assign a secret key to the webhook you want to protect.
iDenfy signs the request
When a webhook fires, iDenfy computes
HMAC-SHA256(secret, raw_body) and attaches the hex-encoded result in the Idenfy-Signature header.Quick examples
Full server examples
Python (Flask)
Python (Flask)
JavaScript (Express)
JavaScript (Express)
C# (ASP.NET Core)
C# (ASP.NET Core)
Important security notes
Troubleshooting
Signature mismatch on every request
Signature mismatch on every request
- Confirm you are reading the raw request body (bytes), not a parsed-and-re-serialized version.
- In Node.js, make sure your route uses
express.raw()instead ofexpress.json(). - Verify the signing secret in your code exactly matches the value in Settings → Notifications → Headers (no trailing whitespace).
Incorrect signature length
Incorrect signature length
The
Idenfy-Signature header contains a hex-encoded HMAC (64 characters for SHA-256). If your computed value is a different length, check that you are using .hexdigest() / .digest("hex") rather than base64 encoding.Missing Idenfy-Signature header
Missing Idenfy-Signature header
- Make sure a signing key is configured for the specific webhook endpoint in the iDenfy dashboard.
- Check that your web framework is not stripping custom headers. Some frameworks normalize header names to lowercase.
Validation breaks behind a proxy or load balancer
Validation breaks behind a proxy or load balancer
Reverse proxies and load balancers can modify the request body (for example, re-encoding JSON or altering whitespace). Ensure your infrastructure passes the raw body through unmodified, or perform signature verification before any middleware that transforms the payload.