Realtime's webhooks allow you to receive notifications about specific events that occur in your Realtime project. You can subscribe to webhook events through the Realtime web app. The events that you can subscribe to include
user.connected and document.updated.When a webhook event is triggered, Realtime sends an HTTP POST request to the URL that you provided during webhook configuration. The HTTP POST request includes the event type and payload as JSON data in the request body.
To authenticate a webhook event, a webhook secret is sent using the
X-API-KEY header with the webhook request. The webhook secret is a randomly generated string that is available in the Realtime web app within your Realtime project. You should keep the webhook secret secure and not share it with anyone. When you receive a webhook request, you can use the webhook secret to verify that the request is authentic.To subscribe to webhook events, log in to the Realtime web app and navigate to the "Webhooks" section. From there, you can specify which events you want to receive notifications for and the URL where you want the notifications to be sent. You can also manage your webhook secret in the web app.
Overall, Realtime's webhooks allow you to monitor specific events in your application in real-time, enabling you to take timely actions based on the received information. For example, when you receive a
document.updated event, you can fetch the updated document from Realtime's API endpoints and update your application's state accordingly. This allows you to keep your application's data in sync with Realtime's documents.Events
user.connecteddocument.updated