How would I get the view count for a given stream?

I used to have a simple userscript to fetch the current view count for my stream, but now I’m just getting “Bad Request” errors from https://api.twitch.tv/kraken/streams?channel=x

I don’t really know where to even start with the new api, it seems much more complicated than what I was using before.

Edit: I found https://glass.twitch.tv/console/apps/create but I don’t understand what exactly I’m supposed to put in the OAuth section.

Are you sending proper Client-Id and Accept headers? Those missing is usually the cause for the requests failing.

Where would I get the client id?

From the details of your registered app at https://dev.twitch.tv/

If you haven’t registered an app yet, you can also create one there, it’s just a few clicks.

Ah yea that’s the page I found before, it wants an oauth url of some sort, I’ve got no clue what to put there

If you are not doing anything oAuth-y and just need a clientID put:

http://localhost/

Which is suggests to in the help text under that field iirc

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.