So it’s probably because I’m new to Twitch’s API, but I have done work with other, non OAuth, APIs before. So I know how to curl and add headers and such. But this baffles me…
and I get back what looks to be (from the file content) the twitch homepage. I get nothing in terms of a authorization code to put into the header of the next request (under Authorization).
What am I missing here? Can someone give me a step by step on how to get this Authorization key from Twitch so I can send commands to it?
The first step of oAuth is to redirect/send the user to that URL in a browser in order for the logged in Twitch user to allow the link between your application and that Twitch account.
Then after allowing the link, they are redirected to your redirect URL with a ?code
That ?code is then exchanged for a token to use with the API
Step 1) Redirect the user to Twitch
Step 2) They accept (or decline) access to the ClientID to their account
Step 3) they come back to your site with a ?code or error message
Step 4) if code exhcnage the code for a token (and refresh token)