I need help with debugging my webhooks, so I already have a webhook setup and it is currently living in an aws lambda function. I have correctly responded to the challenge and I know for sure that I’m currently subscribe to eventsub since I use the get method for subscription and I see my subscription there with my id. I also know that my callback is working because I can test it with the Twitch cli and it is responding with 200, and my cloudwatch also logs them properly, so I know my lambda function really receives those test event.
But now when I actually tried to do some real events on my account like following it with another user, it does not receive any notification. So basically, my partner’s twitch account will unfollow my page, then wait for about a minute and then follow it again, but I don’t receive any event, the lambda function is not even firing since at the very top I have a simple console log to see if it will fire.
I have the scope of “moderator:read:followers” and I’m currently subscribe to “channel.follow”.
I also tried to delete my subscription and resub again but still no effect. But when I do it with my CLI, it works normally.
Also, not related but why is the headers for event sub not uniform? The challenge header has a camel case but the notification header has a lower case, it’s weird…
Eyyyy, it works! status is now set to enabled, Thank you!
Here’s my solution:
This is mainly for aws lambda, make sure to set the content-type to text/plain, and then for some reason even tho I have set the return on my challenge handler, the function still runs and also returns the 200 at the very bottom so technically I’m also returning a wrong challenge, so just make a response variable at the top and update this inside the challenge function and finally just do one return response at the very end
EDIT: I just freaking realize while reading my own post that I’m not actually returning anything on my challenge handler function because that’s a separate function and by default I’m just returning outside of that function