function getUser(username) {
return fetch(`https://api.twitch.tv/helix/users?login=${username}`, {
method: "GET",
headers: {
'Client-ID': "csj7l3h1nqr7iyd1vudl79q21dcen9",
"Authorization": "OAuth pyfhpx64tz6z4fvpb1xf6lrix6gpi9",
'Accept': 'application/vnd.twitchtv.v5+json'
}
}).then(async (res) => res.json())
};
Result
{ error: 'Not Found', status: 404, message: 'This API does not exist' }
{
error: 'Unauthorized',
status: 401,
message: 'The "Authorization" token is invalid.'
}
But my token true help me pls