Getting a 400 error message when trying to get user id

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):

    type: 'GET',
    url: "" + channelName,
    headers: {
      // Ive removed by actual id but its in the form of: 'id'
      'Client-ID': ID,
    success: function(data)
         // Placeholder code for testing
    failure: function(data)
        // Placeholder code for testing

The message Im getting back on my localhost is
{“error”:“Bad Request”,“status”:400,“message”:“No client id specified”}

I think I may have found out what is wrong. I need to include in the header:
'Accept': 'application/vnd.twitchtv.v5+json'

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