justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 379 forks source link

How do I know the name of the auth user? #456

Closed johnRivs closed 8 years ago

johnRivs commented 9 years ago

I managed to set up authentication and there's something that is flying right over my head.

I want to store the name of the user that just went through the auth process and associate the access token to said user. How is my app supposed to know the name of the user I got an access token of, right after I get the token?

I was thinking about making a request to /channel passing the token, but that requires the channel_read auth scope, which I don't really need for my app. Is there no other way?

bashtech commented 9 years ago

The root (https://api.twitch.tv/kraken) will provide username as well has auth status. On Nov 2, 2015 8:26 AM, "John Rivs" notifications@github.com wrote:

I managed to set up authentication and there's something that is flying right over my head.

I want to store the name of the user that just went through the auth process and associate the access token to said user. How is my app supposed to know the name of the user I got an access token of, right after I get the token?

I was thinking about making a request to /channel passing the token, but that requires the channel_read auth scope, which I don't really need for my app. Is there no other way?

— Reply to this email directly or view it on GitHub https://github.com/justintv/Twitch-API/issues/456.

johnRivs commented 8 years ago

@bashtech That's exactly what i needed. Thanks very much1