You need a server (such as running express for example, since we are talking node).
That is capable of recieving HTTP post requests
Ok, express is installed now.
A more channel points specific event sub example
So this is what I have to use to test the finished code for channel points rewards?
What specifically is complicated in the docs?
Well the first thing is, that the code examples are just written in one langage, which seems to be called cURL. As soon as a reader doesn’t know this language (like me), it gets confusing. Streamlabs has a refernce website with 5 different languages. That does not mean, that a js-idiot like me immediatly understands it, but atleast the chances are higher that I can find it out by looking at my language and also the others. E.g. when I looked into the twitch dev docs for my problem, first I looked into Twitch API. But the first code that I see there is this:
curl --location --request
GET 'https://api.twitch.tv/helix/search/channels?query=a_seagull' \
--header 'client-id: wbmytr93xzw8zbg0p1izqyzzc5mbiz' \
--header 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx'
That’s not helpful.
The second thing is, that the docs don’t give enough information. So for example: As mentioned at the start post, I would like to connect to the twitch API and get the CP reward infos. You are so nice and help me by saying “Better you look into PubSub”. So I look into PubSub and the info it gives me is “A PubSub is [explaination].” and “The content of a PubSub is [list of content]”. But there is no “And THIS is how you get the content.”. All I see is “Something, something wss://pubsub-edge.twitch.tv, ping, pong, listen, reconnect” and “Not that important, but good to know”-info like the API Limits. And this way of giving information basicly goes through the whole dev docs. There are no examples of “Here is the summarizing example code for this topic. In chase you want to copy-paste it, there are [EXAMPLE] fields. E.g. one info you need is your Client ID. So look for [EXAMPLE Client ID], delete it including the [], and write you Client ID.”
So all in all the dev docs are written in a way, that feels like you have to be the programmer who programmed all of twitch and with that understand 100% of EVERY single word in it. I mean, of course this site is made for people who know what it is about. And I am just a stupid beginner. But how much it is just assuming that you should know and also remember is really user unfriendly. Just look at my short explaination of how I connect to streamlabs: 4 steps and just 3 lines of code. That’s all. Why is it so hard to put such examples into the twitch dev docs? The dev docs just makes me feel dumb by reading it, annoyed by being forced to ask for help again, and angry that I have to waste somebody else time by answering my stupid question.
Ok, enough of this little rant. Sorry for the text block, it’s just all so exhausting with how hard it is, especially when it could be way easier.
It’s late here now and I go to bed. See you tomorrow. Good night and thanks for helping me (or more like “trying to help” because I am an idiot).