I have an array of channels (15 in total) that im mapping through and subscribing to, i when i check my logs, it is successfully completing the subscribe and point and the callback is returned successfully. at this point if I go live, i get a notification, everything seems like its working. but when other people go live, I get not response back from twitch.
First, you can get rid of 'Accept': 'application/vnd.twitchtv.v5+json' as v5 is part of the old API and not part of the new API (Helix) so doesn’t do anything.
Secondly, I don’t know the the structure of your users array and user objects, but you’re mapping over a users array, and using the variable affiliate for each user in that array, but you’re never actually using that anywhere. The places where you’re wanting to use a Twitch ID you’ve used users.twitchUserId, which if users is an array will mean that’s undefined.
I believe what you intended was to use affiliate.twitchUserId which would be the ID of each user in that array.
If they are not listed on that endpoint then the subscription has either expired, or wasn’t created due to an error, such as not completing one of the subscription steps.
Webhook Subscriptions last up to 10 days, but you’ve set your lease_seconds to 10000 seconds (so a little under 167 minutes)