Getting Oauth token [python]

Are there any examples out there which shows how to get a token on python? I am able to get the user authorisation by opening the url which redirects me to another url which is something like
http://localhost/?code=caktatpoaq9guy7idvq9o0gcl3r0lc&scope=channel_read
How do i get the ‘code=caktatpoaq9guy7idvq9o0gcl3r0lc’ as a return value on the same python script?

Your Python program needs to be running a web server on localhost in order to receive the code being returned from Twitch.

You might also embed a browser into your Python program and use implicit auth, which would allow you to retrieve a token from the redirected URI in the browser context.

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