Python Twitch API Follow

You are sending the user to that URL in a browser, and not attempting to use python to fetch that URL?

As in the example I linked here:

https://barrycarlyon.github.io/twitch_misc/authentication/implicit_auth/