Server to Server Endpoint request unauthorised

You pasted the error message twice :smiley:

Edit after paste fixin, since I was super quick

    url: "https://api.twitch.tv/helix/streams/metadata",

    method: "GET",

    headers: {

        'Client-ID': TwitchClientID

    },

metadata is removed…

This doesn’t match your OP

async function RequestStreams() {
  got({
    url: "https://api.twitch.tv/helix/channels?broadcaster_id=44445592",
    method: "GET",
    headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer `+ accessToken
    },
    responseType: "json"
})

This

    headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer `+ accessToken
    },

becomes

    headers: {
        'Content-Type': 'application/json',
        'Client-ID': clientID,
        'Authorization': `Bearer `+ accessToken
    },
1 Like