Invalid client when trying to get oauth token ( for application)

The Client ID, Client Secret, and the Redirect URI that you need to set, are all done through the Developer Console when you select your app.

The Auth Code Flow isn’t a complicated process, it’s a standard used by many companies/services.

  1. Send the user to the auth URL at Twitch.
  2. If the user accepts the connection to your app they are redirected to your Redirect URL with a code in the querystring
  3. your server listening on that Redirect URL (or if it’s a 1 off thing, you can do it without a server and just copy the code out of the browser URL bar and finish the process manually) can exchange that code for an Access Token and Refresh Token pair.
  4. The token lasts ~4 hours, so you’ll need to periodically refresh it as specified in the docs (this process can be automated, and doesn’t require user intervention)