Webhook Reference
Validate webhooks from Loop
Each webhook sent by Loop includes an X-Loop-Signature
header.
This header contains a value you can use to verify that the webhook originated from Loop’s system. The value is generated using the SHA256 algorithm.
When you receive a webhook from Loop, use the webhook’s secret to generate a SHA256 HMAC of the request body, encoded as a base64 value. You can find the webhook secret in the Developer Tools page of the Loop Admin (the same place you can create webhook subscriptions).
Compare your calculated HMAC to the value in the X-Loop-Signature header included with the request. If the values match, you can confirm that the webhook came from Loop and has not been tampered with.