I’m building my project completly new from php to js.
I copied the same code but I always got { status: 400, message: ‘Invalid authorization code’ }
I dont know what the problem is
I’m building my project completly new from php to js.
I copied the same code but I always got { status: 400, message: ‘Invalid authorization code’ }
I dont know what the problem is
The code is already used is a common problem here. As the code
is a one use code to be exchanged for a token
The code
should be dynamically obtained from the URL as it’s a query strin parameter and not hard coded.
that was the response from oauth2/authorize
{
code: ‘n61ps7fvucwkfu708vpam6nb6xtozt’,
scope: ‘user:read:email’,
state: ‘qbf17d9ernqbf17d9ern’
}
I used the code from response
Then you have either
code
in time, they have about 5 minutes to livecode
to exchange for a token, they are one useThen this suggests a fault in twitchClass.getTwitchAccessToken
Would need to see what that function is doing.
Broadly looks correct.
What does queryBuilder
do?
Heres a simplier fetch example to reference
I tried it with your method and it worked.
THANKS!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.