This works fine and returns the URL plus 2 parameters, Code & Scope. Am I supposed to do anything with these? What is the Code used for?
When a user is authenticated like that, how am I able to see their information (Name, Stream URL, Description etc) in my application?
If/when I do get that information, do I need to create a second username in my own database for them to log in with? Or is them logging in with twitch enough that they won’t need a log in for my own application? I’m struggling with understanding the relationship between Twitch API, Twitch Username, OAuth, and storing information in myDB through myAPP.
This gives you a Server Token, which is only useful to give you a higher request rate for non user API requests.
You take the code and perform step three of the oAuth dance, you exchange the code for an access token, as documented:
3) On your server, get an access token by making this request:
POST https://id.twitch.tv/oauth2/token
?client_id=<your client ID>
&client_secret=<your client secret>
&code=<authorization code received above>
&grant_type=authorization_code
&redirect_uri=<your registered redirect URI>
After obtainin an access token via step 3 of hte oAuth dance you can make an authenticated request to