Once you’ve created an app in the developer console you can get an OAuth token by following the Auth Code flow https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-authorization-code-flow
Keep in mind that to use the Get Game Analytics endpoint you need a token with the analytics:read:games scope, and it has to be granted to your app by a user account that’s a member of the organisation who have claimed that game on Twitch.