When you configure a webhook_secret on your agent, Flireo signs all webhook requests. You should verify these signatures to ensure requests come from Flireo.Flireo uses HMAC-SHA256 to sign webhooks. The signature is included in the X-Webhook-Signature header.How It's Calculated#
message = timestamp + "." + raw_request_body
signature = HMAC-SHA256(secret, message)
Verification Examples#
Python#
Node.js#
PHP#
Best Practices#
1.
Always verify in production - Never skip signature verification in production
2.
Use timing-safe comparison - Prevent timing attacks with constant-time comparison
3.
Check timestamp freshness - Optionally reject requests older than 5 minutes to prevent replay attacks
4.
Store secret securely - Use environment variables, not hardcoded values
5.
Log verification failures - Monitor for suspicious activity
Timestamp Validation#
Optionally validate the timestamp to prevent replay attacks: Modified at 2025-12-29 14:27:19