Python Twitch API Follow

Using this flow:

  1. Redirect the user to Twitch
  2. If they accept they are sent back to you with a code as a query string variable
  3. Exchange the code for an access token
  4. Use the access token

Step 1 is usually delivered via a WebPage so the user can click and go to Twitch to accept/reject the Apps access to the users account.

If you go Implicit auth, that I already linked, you can do the follow stuff via pure HTML/JS using this example as a basis

Has a live demo you can try