How can I debug webhooks? I want to utilize webho...
# server-api
m
How can I debug webhooks? I want to utilize webhooks so that I can send a voip notification to my app when a room is created, to simulate a phone call. I receive the webhook with my backend, parse the room name, and am able to connect the receiver. But it only works around half of the time. It seems only 50% of the webhooks events for "room_started" reach my api. I am unable to figure out why. I can see that the room is indeed created, with a unique name, using the
lk room list
command. So where does the webhooks go? What happens? I can't figure out how to debug this.
f
Can you please share your project ID (the one that looks like p_random ) and an example room where the webhook worked and another where it did not?
m
Sure! Give me 1 minute.
p_68kqdut44hj Working webhook:
sip_.e7779f35-f674-435d-b76a-b0efd01b50c8_4fmTQr6XW5tS
For the failed webhook I am suddenly not able to reproduce it, so can't find the entire room name. But one of the failing room names started with:
sip._0f773eb7-ff22-4fab-bee1-84d12caeaa73_<random>
Could it have been some unstability in LiveKit Cloud?
Found an example: For this room
sip_.310c86ea-c0b5-4f65-bb42-ea4109c08925_MWaiurNLibbJ
we only received the
room_finished
event.
f
It was sent, but seems like it was sent to a different URL. Were you actively changing webhook end points. NOTE: the time in those logs is IST (GMT +5:30)
m
That is weird.. This is my webhook settings:
But I did change the URL in webhook config earlier today, so it seems to be cached somehow on your end?
f
Yeah, there might be some caching issue. Will look into it. Please let us know if you see issues when webhook config is stable at your end. WIll keep you posted on any updates at our end.
m
Thanks!
f
Found an issue with usage of stale data. Changes are deployed now. Please let us know if you continue to see issues.
m
Good to hear. Thank you.