Stuck on Twitch API - I have registered app, client ID, seemingly simple problem

Stuck on Twitch API - I have registered app, client ID, seemingly simple problem
0.0 0

#1

Hi all,

I went the registered app route because the wind-bow API would not give me JSON, just a CORS error.

I get the same thing with this code using the updated https://id.twitch.tv/ suffix. I have my client ID hard-coded (somewhat). Do I need to do anything with the URI (that’s URI not URL). I have gone through the Twitch Authentication docs for about 2 hours and am a bit confused.

I am at the very beginning where I just want to spit out the JSON to the console before I move on to actually building the app. I read-search-asked I promise.

var clientID = '0pv3vm5xp7pquz06o0f6e4pm8qgmx2'
  
var settings = {
  "async": true,
  "crossDomain": true,
  "url": " https://id.twitch.tv/users/OgamingSC2?client_id=" + clientID,
  "method": "GET",
  "success":function(data){
    console.log(data);
  }
}

$.ajax(settings).done(function (data) {
  console.log(data);
});

Is there anything else that needs to be configured to not get that blasted CORS error?


#2

Just curious, but did you use https://wind-bow.gomix.me/ in your URL? You should use https://wind-bow.glitch.me/ instead. Those instructions were written when glitch.com was still gomix.com, and they haven’t been updated since.

I’m not sure about the Twitch API though. It looks like it has changed a lot since the last time I used it.