You can use webhooks to send events and user state from Radar to your server, a Google or Firebase Cloud Function, an AWS Lambda Function, or any HTTP endpoint. From there, you can store events and user state in a database, send them to a marketing automation or analytics platform, and more.
Create a webhook on the Radar Integrations page under Webhooks. For Environment, choose Test to receive callbacks for events in the Test environment, or choose Live to receive callbacks for events in the Live environment. For Event Delivery, choose Single Event to receive a single event in each request, or choose Multiple Events to receive multiple events in each request when events occur simultaneously. Finally, enter a URL.
Whenever events are generated, Radar will send a POST request containing event and user data to the specified URL. You can also click the Test button to send test event and user data. If you chose Single Event, the request body will contain an
event dictionary and a
user dictionary. If you chose Multiple Events, the request body will contain an
events array and a
To acknowledge receipt of the request, your webhook should return a
2xx status code (e.g.,
201 Created, or
Each webhook has a random security token. The authenticity of a request made to a webhook URL can be verified using the
X-Radar-Signature header. If you chose Single Event, the header will contain an
HMAC-SHA1 hash of the event ID using the security token as the key. If you chose Multiple Events, the header will contain an
HMAC-SHA1 hash of the first event ID using the security token as the key.
Note that you can also receive events client-side via the SDK.