Invalid access token. Im confused

I tried Getting a token.

https://id.twitch.tv/oauth2/authorize?response_type=code&client_id={myClientID}&redirect_uri={myRedirectURL}&scope=channel:read:subscriptions

and got a token.

then, I tried

curl -H “Authorization: OAuth {a token}” https://id.twitch.tv/oauth2/validate

so, i received message is

{“status”:401,“message”:“invalid access token”}

i dont know what is wrong.

P.S.

I tried too curl -H “Authorization: Bearer {a token}” https://id.twitch.tv/oauth2/validate

message is
{“status”:401,“message”:“missing authorization token”}

Did you do step 3 of the Auth process mentioned in the docs? https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#oauth-authorization-code-flow

The first link you posted doesn’t give you an access token, it gives you a code which you then can use to exchange for an access token.

solved! thx!!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.