Receiving 401 (Unauthorized)

Hello guys, I’m new to this and I’m just trying to fetch some data using the API, but I keep receiving error 401. My Client-ID is correct, I don’t know what else it could be. Can you guys see if there is something wrong with my code?

<script src=""></script>
function GetGame(){
    var result = [];
      type: 'GET',
      url: '',
      headers: {
        "Client-ID" : "MY_ID_HERE",
        "Accept": "application/vnd.twitchtv.v5+json"
      success: function(json) {

    return result;


Are you obtaining and using an oAuth token?

  • You don’t need the v5 header with helix
  • You don’t have an oAuth token, Helix requires an oAuth token

I’m following step 2 from this doc it does not mention an oAuth token. Where should I find about this?:

You missed the header at the top.

Some of the documentation has not been updated to account for the recent changes to the API

My bad, Thanks for pointing it out!

No problem!

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