Skip to main content

Overview

Every webhook Yuno sends includes an HMAC-SHA256 signature in the request headers. Verifying this signature ensures the webhook originated from Yuno and has not been tampered with in transit.
Always verify webhook signatures before processing events. Unverified webhooks could be spoofed by malicious actors to trigger unauthorized actions in your system.

How Signature Verification Works

  1. Yuno computes an HMAC-SHA256 hash of the raw request body using your signing secret
  2. The hash is included in the x-yuno-signature header
  3. Your server recomputes the hash and compares it to the header value
  4. If they match, the webhook is authentic

Retrieve Your Signing Secret

Find your webhook signing secret in Dashboard > Settings > Webhooks. Click on your endpoint to reveal the secret. Store it securely as an environment variable.

Implementation

Timestamp Validation

In addition to signature verification, validate the timestamp to prevent replay attacks:
A tolerance of 5 minutes (300 seconds) is recommended. Webhooks older than this window should be rejected to prevent replay attacks.

Common Issues

Testing Signature Verification

Generate a test signature locally to validate your implementation: