I’m trying to get a user id from a username but Im not getting a successful response to my ajax message. My code to do so look like this (right now Im not worried about looking at the json object that is returned, first I need to get it):
$.ajax({
type: 'GET',
url: "https://api.twitch.tv/kraken/users?login=" + channelName,
headers: {
// Ive removed by actual id but its in the form of: 'id'
'Client-ID': ID,
},
success: function(data)
{
// Placeholder code for testing
$('#streamer_data').append("Success");
},
failure: function(data)
{
// Placeholder code for testing
$('#streamer_data').append("Failure");
}
});
The message Im getting back on my localhost is
{“error”:“Bad Request”,“status”:400,“message”:“No client id specified”}