Error invalid Oauth token

hi, i’m actually triying to send a request but i permanently have the error : Invalid OAuth token, when i use the token i generated on twitch.
with an error 401 acces denied
my code :
export async function Data(url =‘’) {
const headers = {
‘Client-ID’: ‘xxx’,
‘Authorization’: ‘Bearer xxx’

  const result = await window.fetch(url, {
    .then(async (data) => await data.json())
    .catch((err) => err.message);

if u have a solution i hug u

As the error would indicate, your OAuth token is invalid, so I’d suggest reading through the Authentication Docs and ensure you’re properly completing one of the OAuth flows.

i’m pretty sure i did the good step

If you think you’ve gone through the Authentication process correctly you should be able to use the Validate Token endpoint which will tell if if the token is valid or not.

ok i got a problem with my key probably cause i tried again one day later and it worked, ty btw