Oauth and user Id/login name

Hello everyone,
I want to ask something, but before that i would like to apologize if there is already a reference somewhere which I overlooked.
My problem is fairly simple and it goes like this:
I have a link for oauth token that goes like this href=“https://id.twitch.tv/oauth2/authorize?response_type=token&client_id=…&redirect_uri=http://localhost/TwitchPHP/unfollow.php&scope= analytics:read:extensions” and it works properly.
When the user is redirected besides the token I need a user id or/and login name. Is it possible that auth page can give me that besides the token or if i can get it as a json page.
I handled that before with a form, but that form can not give me the token…
Again, excuse my ignorance I am fairly new with API and all of the backend programing !
Any advice is Highly appreciated !

I am sorry for the stupid Question, I answered it myself
For anyone interested or having the same problem -> https://dev.twitch.tv/docs/authentication/getting-tokens-oidc/#claims

Either use OIDC login, as you have found.

Or once you have got a token (without OIDC) perform a API lookup with the token against any of the user (kraken v3/v5 or helix) endpoints with the token and it returns the user.


With just a token, (don’t specifiy a user ID or login) will return the user identified by the token you have

1 Like

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