Hey Kein, this is what you’re probably looking for: https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#oauth-client-credentials-flow
Basically, you need to make a POST request such as this POST https://id.twitch.tv/oauth2/token?client_id=<your_client_id>&client_secret=<your_secret_id>&grant_type=client_credentials
Then you get the answer with your access_token (bearer token):
"access_token": "<user access token>",
"refresh_token": "",
"expires_in": <number of seconds until the token expires>,
"scope": "<your previously listed scope(s)>",
"token_type": "bearer"
That’s it.
Also, scope is optional. And to refresh your bearer token you simply need to request a new one.