Webhooks

Webhooks are available starting from the Starter plan.

You can send demo events to the Webhook URL.

circle-exclamation

Identifying Leads


How to Integrate

  • Click the "Settings" on the left-hand menu, and then click on the "Integration" tab.

  • Choose Webhook integration and click on the "Connect" button.

  • Paste the webhook URL (This is the URL where you want to receive webhooks)

  • Lastly, decide whether you want to send webhooks for all demo sessions (unknown and known), or only when the lead or account is known.


How do I verify the webhook signature?

To ensure that webhook requests are coming from Storylane and have not been tampered with, we recommend verifying the signature included in the request headers.

Every webhook request includes an x-storylane-signature header. This signature is an HMAC-SHA256 hash of the raw request body, generated using your Webhook Verification Secret and then Base64 encoded.

1. Retrieve your Verification Secret

You can find your Verification Secret in the Storylane dashboard under Settings > Integrations > Webhook. Keep this secret secure; do not share it or commit it to public repositories.

2. Verification Logic

To verify the signature:

  1. Retrieve the x-storylane-signature header from the request.

  2. Get the raw body of the request (unparsed string).

  3. Compute the HMAC-SHA256 hash of the raw body using your Verification Secret as the key.

  4. Base64 encode the resulting hash.

  5. Compare your generated string with the value in the x-storylane-signature header.

3. Implementation Examples

Node.js (Express)

When using Express, ensure you use the raw body for the HMAC calculation.

Ruby

Python (Flask)


Webhook Example

To help you understand what kind of data you can expect from our webhooks, here's a sample response payload for unknown and known demo sessions.

Known demo sessions (known lead data)

Unknown demo sessions (unknown lead data)

Last updated

Was this helpful?