I’m writing a program that uses three different API endpoints from twtich:
-
https://api.twitch.tv/kraken/oauth2/authorize
-
https://api.twitch.tv/kraken
-
https://api.twitch.tv/helix/users
The first two always work fine, but the third endpoint sometimes causes my program to sometimes hang. It’s inconsistent, with the request working just fine some of the time.
I have no idea what could be causing this, and whether it’s on Twitch’s side or mine.
This is the code for the third request:
const reply = await request({
uri: `https://api.twitch.tv/helix/users?login=${username}`,
headers: { 'Client-ID': CLIENT_ID },
json: true
});