Hello all,
I am making a php app that needs to get a user’s username and OAuth token for authorization purposes. I have used the Authorization Code Flow to get an OAuth token, but I can’t figure out how to get their username in this process. All my website consists of at the moment is a “Connect with Twitch” button that will give me an authorization code, which I can then submit to https://api.twitch.tv/kraken/oauth2/token
along with my client id, client secret, and my redirect uri to get the OAuth.
I have read that I should be able to submit the access code to the root of the api to get username and other details, but whenever I try submitting the same request as above to https://api.twitch.tv/kraken/
I just get a “You are being redirected” message (to twitch.tv/kraken).
Any help would be appreciated!
gman