Is something missing here?

Is something missing here?
0

#1

Before I go too far, is something important missing here:


#2

Hi, it indeed seems like something is missing. It looks like they will just give you a sample response on a link that is not yet active. You can still use the Twitch API, but you will have to get a client-id. In the post beneath you can see how to add the client-id to your ajax request.


#3

I have found that you must place the client id both inside the ajax call and in the header.
Also, remove the callback.
Hope this helps.


#4

Hey, I used this code:

$.ajax({   
  url: 'https://api.twitch.tv/kraken/channels/' + channel,   
  headers: { "Client-ID" : "Client-ID" } 
})
.done(function(data){     
 // Or use succes
});

So you only need to include the client-id in the header.


#5

Thank you for that. I don’t know why I needed it in both locations, I’m just glad it finally works :blush:


#6

i finally got it to work, removing callback, and client id only in the header.

thanks