Hello guys, I am working on my own IPB forum and I am trying to create a list with streamers (about 5) and their status.
I am pretty sure that there are many request like this one, but everything I found is old and not working.
Here are some examples I found in internet, but couldnt make em work:
http://jsfiddle.net/LYv3R/634/
http://jsfiddle.net/LYv3R/635/
Both are showing offline, even if the streamer is online.
Thank you friends.
3ventic
December 5, 2016, 11:58am
2
Neither of those scripts is sending the required client ID.
In case you missed it, the Kraken API will require a Client-ID as of August 8th, 2016. Read the blog for more details. Here are a few FAQs that I thought I’d address in one place:
Is the Client-ID required for all API calls?
Yes! Every API call, no matter how simple, will require the Client-ID in the header.
If I’m including an OAuth token, do I need to include a Client-ID?
If you are passing in an OAuth token, we will figure out the Client-ID for you.
Are query string parameters still supp…
1 Like
I read that topic : https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843#.h4pvaom5p
and it says “Add the Client-ID to the header of your request.”
I got my Client ID, but dont know how to build the full code:
http://jsfiddle.net/LYv3R/638/
This works for me:
HTML:
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
</head>
JS:
$.getJSON("https://api.twitch.tv/kraken/streams/illusionaryone?client_id=my_client_id", function(c) {
if (c.stream == null) {
console.log("Offline");
} else {
console.log("Online");
}
});
I believe you may need to include your client_id on the request as well, I didn’t try using your entire script though.
1 Like
Thank you so much man. I made it work.
1 Like
system
Closed
January 5, 2017, 3:41pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.