Webhooks
Setup webhooks and ensure your server is only receiving the expected Ticket Spot requests for security reasons.
Last updated
Setup webhooks and ensure your server is only receiving the expected Ticket Spot requests for security reasons.
Last updated
Once your server is configured to receive payloads, it'll listen for any payload sent to the endpoint you configured. For security reasons, you probably want to limit requests to those coming from Ticket Spot. There are a few ways to go about this--for example, you could opt to allow requests from Ticket Spot's IP address--but a far easier method is to set up a secret token and validate the information.
To setup webhooks
Go to "Automations" within your dashboard
Select your trigger type you want to trigger events from
Select "Webhook" from the action list
Enter a destination URL where the payload will be sent
Enter a secret token that you will use to verify the header signature
When your secret token is set, Ticket Spot uses it to create a hash signature with each payload. This hash signature is included with the headers of each request as x-ts-signature-256
.
For example, if you have a basic server that listens for webhooks, it might be configured similar to this:
The intention is to calculate a hash using your SECRET_TOKEN
, and ensure that the result matches the hash from Ticket Spot. Ticket Spot uses an HMAC hex digest to compute the hash, so you could reconfigure your server to look a little like this: