Skip to main content
Webhook signing secrets can be used to verify that incoming requests genuinely originate from our systems and haven’t been tampered with. Only account administrators can reveal signing secrets. To retrieve a secret, sign in to the Sohar dashboard and open Webhooks. Select the endpoint, find the Signing Secret section in the right-hand detail panel, then click to reveal and copy the value. This reveals the existing secret for that endpoint without generating or rotating it. Sohar webhooks use Svix for secure message delivery. To verify the authenticity of these webhooks, you must:
  • Use the provided webhook secret.
  • Extract and process the svix-id, svix-timestamp, and svix-signature headers.
  • Use the raw body of the request to compute the HMAC signature.
1

Install the Svix SDK

This is a JavaScript example. Other language examples are available in the Svix documentation.
2

Use the Webhook Verifier

Set WEBHOOK_SECRET to the copied signing secret for the endpoint receiving the webhook.
Always use the raw request body when verifying webhooks, as even minor changes can invalidate the cryptographic signature. Be cautious with frameworks that automatically parse and re-serialize JSON bodies - this transformation can alter the payload and cause signature verification to fail.