I have a webhook sub event server set up and it is working. I can use the twitchcli event to verify the subscription and receive the following: Valid response. Received challenge in body Valid content-type header. Received type text/plain Valid status code. Received status 200
However, when I try to sub to an event, it times out every time. Twitch shows the sub as enabled, but I can’t callback to my local code. Here’s a snippet:
I am running these on 2 Azure Linux VMs. I tried WebSockets, but ran out of socket subs really fast for what I’m trying to do and research indicates for me to get around that, I needed to switch to web hooks. Again, the subscription goes through on twitch’s end. I can ping subscriptions and get a list of enabled subs, it just never calls back to my original code to set up my callback.
Thank you, again, for the quick reply. I tested both of my servers and both return an A result. Is there another port I should allow on the Azure side? I have included inbound and outbound rules for ports 80 and 443.
This is a chat bot I’m making. It’s not gonna stream, but it is logging in and authorizing correctly to sub to these events. If I kick off the bot after getting the subs on twitch, it will start chatting with live followers, but if someone goes live, the sub callback never reaches the bot end. I have tried setting eventsub.wait_for_subscription_confirm to false, but that just gets around the timeout issue, it doesn’t actually bind the eventsub listener.
My mistake! I have code to check if they’re live and handle correctly connecting and messaging if they are. The main setup is to go through the bot’s followers and set up the subs for each follower (that’s how they invite the bot into their stream - follow it) and set up a sub (if it doesn’t already exist) to check when that follower goes live so it can connect to chat and when they go offline so it can disconnect from chat. I see what you mean by it may be a library issue. If the port checks aren’t the issue, I can try the old school request/response method and see I can get something working.
Sorry it’s been a minute! I wanted to give an update. I was able to get the bot up and running on Friday using the advice you gave me. It’s working just like it’s supposed to, now. Thank you so much for you assistance! (For your heads up, I switched to a full webhook handler, so it’s all handled on the same server within the webhook handlers )