You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide provides a step-by-step approach to setting up webhooks in {{product_name}} to integrate external systems.
6
4
@@ -21,10 +19,13 @@ Ensure that you have:
21
19
22
20
Your external web service should do the following to receive event notifications:
23
21
24
-
1. Expose an endpoint that accepts both HTTP GET and POST requests with JSON payloads.
25
22
{% if product_name == "Asgardeo" %}
23
+
24
+
1. Expose an endpoint that accepts both HTTP GET and POST requests with JSON payloads.
26
25
{{product_name}} sends GET requests for subscription and unsubscription verification.
27
26
Your endpoint must respond to these GET requests with the <code>hub.challenge</code> string to confirm its readiness to receive events.
27
+
{% else %}
28
+
1. Expose an endpoint that accepts HTTP POST requests with JSON payloads.
28
29
{% endif %}
29
30
{{product_name}} sends POST requests to deliver the actual event notifications. These requests contain the event payload in JSON format.
30
31
@@ -99,7 +100,7 @@ This process adheres to the [WebSub specification](https://www.w3.org/TR/2018/RE
99
100
100
101
## Receive webhook events
101
102
102
-
{{product_name}} sends an HTTP POST request to your webhook endpoint when a subscribed event is triggered. This request contains a JSON message with event details. Your service can then parse and use this information as needed.
103
+
{{product_name}} sends an HTTP POST request to your webhook endpoint when a subscribed event is triggered. This request contains a JSON message with event details. Your service can then use this information as needed.
103
104
104
105
### Event payload structure
105
106
@@ -118,7 +119,7 @@ Webhook event payloads adhere to the [Security Event Token (SET) specification (
@@ -265,7 +278,7 @@ If your webhook isn't functioning as expected, consider the following common iss
265
278
- Verify that your webhook endpoint is online, running, and publicly accessible to {{product_name}}. Tools like <code>curl</code> or online HTTP testing services can help check external reachability.
266
279
- Check your endpoint's server logs for incoming GET requests from {{product_name}}. Configure your endpoint to read the <code>hub.challenge</code> query parameter and respond with a <code>2xx</code> HTTP status code, returning the exact <code>hub.challenge</code> string in the response body. {{product_name}} delivers events only after a successful subscription.
267
280
- Ensure that no firewalls, security groups, or network ACLs are blocking incoming connections from [{{product_name}}'s IP ranges]({{base_path}}/references/asgardeo-outbound-ip-addresses/).
268
-
- If your endpoint receives the request but doesn't process it, there might be an issue with your code parsing the JSON payload or handling the <code>X-Hub-Signature</code> header. Review your application logs for errors.
281
+
- If your endpoint receives the request but doesn't process it, there might be an issue with your code parsing the JSON payload or handling the <code>x-hub-signature</code> header. Review your application logs for errors.
269
282
- {{product_name}} retries failed deliveries. Consistent failures show a persistent issue with your endpoint. Look at addressing them.
270
283
271
284
3.**Event signature (HMAC) mismatch**
@@ -351,7 +364,7 @@ Follow these guidelines to ensure your webhook implementation remains resilient
351
364
352
365
Events might also apply to different resources under the same event type. For example, *credential updated events* currently happen for password updates, indicated by the <code>credentialType</code> property in the payload. In the future, the same event could happen for passkeys, TOTP, or other credential types, introducing new values for <code>credentialType</code>. Design your logic to safely ignore or specifically handle new values for such properties if you only want particular resource updates (for example, only password updates).
353
366
354
-
3. Ensure graceful unknown property handling:
367
+
3. Ensure graceful unknown property handling
355
368
Avoid strict schema validation that would cause your webhook to fail if {{product_name}} adds new, optional properties to an existing event payload. Your parser should be able to ignore unrecognized properties, ensuring forward compatibility.
356
369
357
370
By following these practices, your webhook will be more adaptable to future enhancements in {{product_name}}'s event delivery, requiring fewer updates on your side to maintain functionality.
0 commit comments