James1
June 3, 2022, 10:52am
1
Hey everyone,
I would like to create a Authorization to collect token and access the redemptions on channelpoints. But api return this
{ "status": 401, "message": "invalid csrf token" }
Probably i do a mistake somewhere, but i dont know where.
I created a request in Insomnia:
Can you help me, to solve this problem? Thanks.
Step 1 of oAuth is to redirect the user to Twitch.
Not to fetch the URL
Also: ClientID’s are public. So you censored it for no reason.
oAuth steps:
User comes to your website
User clicks link to login with Twitch
User is taken to Twitch
User accepts (or declines) the link between ClientID and their account
If Accept they come back to your website with a ?code
You exchange the ?code
for an access and refresh token
You are getting an invaldi CSRF token as the security system is preventing you trying to do this wrong.
Here is an implict auth (not code auth which you want to use) example to demonstate the flow
https://barrycarlyon.github.io/twitch_misc/authentication/implicit_auth/
James1
June 3, 2022, 11:43am
3
OHHH ok i understand … Thanks BarryCarlyon. Thanks so much
system
Closed
July 3, 2022, 11:44am
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.