AuthRocket generates numerous events based on activity of the data in each realm. Sometimes it’s really useful to have AuthRocket notify your app via a webhook in response to one or more of those events.
Webhooks have a built-in retry mechanism and will be retried several times over the course of about 2 days. A 2xx response is required for success, whereas a 4xx or 5xx response will be treated as an error and retried. You can see the status of the webhook(s) for an individual event under Events.
A webhook may be triggered for one, several, or all events.
The URL in your app that will receive the webhook. Webhooks always use POST. HTTPS is strongly recommended.
The delivered webhook payload will include the same basic event information as would be retrieved using Get an Event.
To authenticate the webhook, there are several options:
Note that webhooks can come in quite rapidly if you generate a ton of events at once, say using a batch process. If this is a problem for your app, slow down the batch process itself.