"callback": "Website that is listening for response",
I am getting a Unauthorized 401 Must provide valid app token. This is the same way I am sending my app token for numerous other requests, is something different for EventSubs?
Also when twitch sends the initial Get response of webhook_callback_verification_pending, am I supposed to verify the Header and send a 200 status (if it matches)? I don’t need to send back a challenge or anything like that (as needed for the existing webhooks). The second response (with the actual requested information) just needs a simple 200 status response correct?
I got app token and user token mixed up, that was my mistake. I went back and reread (for what feels like the umpteenth time) and see where all the responses will be post responses back to me.
It does appear that I need to send the challenge back after the initial subscription.
Return the value of challenge from the callback verification request to complete the verification process. Your response must be a raw string. If your server is using a web framework, be careful that your web framework isn’t modifying the response in an incompatible way. For example, some web frameworks default to converting responses into JSON objects. pogchamp-kappa-360noscope-vohiyo
I think I have things mostly figured out now, just need to flesh it out a little more.
I am watching for any post request on that port and am not seeing anything come in. I have verified the url by sending a generic post message to the callback URL and I do see that come in, just nothing from twitch. What am I missing, is specifying the port causing an issue (I hope this isn’t the case)?
I am watching the traffic on my server and I never see Twitch sending the callback verification. I am trying to figure out what the issue is, and if it is related to the port number in the callback. I can’t return the challenge if I am never getting the challenge on my server.
I understand it is a non standard port, that is how the whole webserver is setup. So I guess the answer to my question is that the EventSub can’t handle a non standard port (even though Webhooks could). If this is the case this is something that should be addressed.
Webhooks also had issue with non-standard ports using SSL. The difference here is that EventSub ONLY supports SSL, where as for webhooks it was optional for any topic that didn’t require a scope.
What you may want to consider is using a reverse proxy, such as Nginx, so you can run your app on whatever port you like but Nginx will run on 443 and forward the traffic internally to the port your app is listening on.