Webhooks with port number don't appear to trigger
I have an issue where the webhook doesn't POST to an endpoint that has a port number when the Kinde event is triggered - user.created in my specific case.
I have two webhooks setup, both for the same user.created event. One points to an httpdump.app address as a testing sink , the other to an address that has a port in it eg https://api.myapp.devc:8090/api/hooks.user/created . When a user is created, I get the POST event received at the httpdump.app endpoint, but nothing at the port-based address.
My port-based endpoint receives the POST OK when I grab the event body received at the httpdump.app sink, and use Postman to POST it manually to the endpoint.
My UAT environment does not have a port number associated with the endpoint, and the same config with two webhooks firing on the same event works fine - the POST is received at both endpoints - so I'm fairly sure the issue is the port number, but it may be something else
This issue follows on from a previous port issue with setting the webhook endpoint with a port number that was resolved here https://discord.com/channels/1070212618549219328/1400465564589097041
2 Replies
Hi, Thanks for reaching out.
For webhook endpoints to receive Kinde events successfully, they must meet specific criteria: - Endpoints must use HTTPS - Return a 200 response to indicate successful receipt - Be publicly accessible When Kinde fails to receive a 200 response from your endpoint, it operates a back-off retry policy with multiple attempts over 36 hours. Since your httpdump.app endpoint receives the webhook but your port-based endpoint doesn't, this suggests the port-based endpoint may not be publicly accessible to Kinde's webhook delivery system. To troubleshoot this: 1. Verify public accessibility: Ensure
Thanks.
For webhook endpoints to receive Kinde events successfully, they must meet specific criteria: - Endpoints must use HTTPS - Return a 200 response to indicate successful receipt - Be publicly accessible When Kinde fails to receive a 200 response from your endpoint, it operates a back-off retry policy with multiple attempts over 36 hours. Since your httpdump.app endpoint receives the webhook but your port-based endpoint doesn't, this suggests the port-based endpoint may not be publicly accessible to Kinde's webhook delivery system. To troubleshoot this: 1. Verify public accessibility: Ensure
https://api.myapp.devc:8090/api/hooks.user/created
is publicly accessible from external networks, not just internally
2. Check firewall/network configuration: Port 8090 may be blocked by firewalls or network policies
3. Test webhook delivery: Use the webhook management features in Settings > Environment > Webhooks to verify the endpoint configuration. (https://docs.kinde.com/integrate/webhooks/add-manage-webhooks)
4. Monitor webhook attempts: Check if Kinde is attempting delivery but failing - this would trigger the retry policy
Since your UAT environment without port numbers works correctly, and manual testing via Postman succeeds, the issue is likely network accessibility rather than your endpoint implementation.
You can manage and troubleshoot webhooks through the Kinde Management API using endpoints like GET /api/v1/webhooks
to list webhooks and verify their configuration
Let me know if this helps, or if any further clarification needed.Thanks.
OK, I've just setup a fresh test case to verify if it is my config or Kinde not sending to port numbers, and I'm fairly sure Kinde is the issue.
Here's what I did:
1. Wrote a small HTTP dump app in dotnet that just received content on a POST endpoint and writes the entire request to disk
2. Deployed that app to a virtual Windows server I have in Brisbane.
a. Setup the app in IIS with a domain name, DNS, SSL cert and all that jazz
b. Enabled port 5198 for http, 5199 for https, and also 443 for https as bindings in IIS, and opened access in the firewall to those ports
3. Verified using Postman that the POST /dump method worked from:
* My computer in Melbourne using port 5199
* My computer in Melbourne using no port (so default 443 in that case)
* My computer in Melbourne on both 5199 and no port, but routed via a VPN that was exiting in Ireland to exclude any IP geo-blocking issues
4. Then went into Kinde, and setup two new webhooks linked to the user.updated event:
* A test webhook pointed to https://httpdump.app/dumps/5615d09f-9ef4-481b-812f-ef5c07c34241 for monitoring as I know this dump spot works
* The port based webhook endpoint pointing to the address https://httpdump.redacted.com.au:5199/dump
5. Edited a user in Kinde, and
* Received the webhook POST to the https://httpdump.app/dumps/5615d09f-9ef4-481b-812f-ef5c07c34241 as expected
* Got nothing on the https://httpdump.redacted.com.au:5199/dump endpoint
6. Edited the webhook in Kinde, and removed the port number, so as to fallback to the default 443 port (sot he endpoint was just https://httpdump.redacted.com.au/dump), and retested by edioting the user again
* Received the webhook POST to the https://httpdump.app/dumps/5615d09f-9ef4-481b-812f-ef5c07c34241
* Received the webhook POST to the https://httpdump.redacted.com.au/dump
So based on all that, I think the webhook sending process from Kinde seems to not like port numbers in the endpoint
Interestingly, the webhook endpoints https://httpdump.redacted.com.au/dump and https://httpdump.redacted.com.au :443/dump both work OK. (had to put a space in the second one as Discord appears to hide the 443 port when I save the comment, so also ignore the slash prior to the :443 bit)
Moved this to a bug report: https://discord.com/channels/1070212618549219328/1404267448789893230/1404267448789893230