Today I wanted to work on my Bot discord project in java and I’m querying the helix API, but I got the error:
{
“error”: “Unauthorized.”
"Status: 401,
“message”: “OAuth token is missing.”
}
Whereas 2 days ago everything worked and I haven’t changed my header since.
All helix requests require an oAuth token as of yesterday.
As the Error message you are getting states
You need to use an oAuth token with your request, most commonly you need an App Access Token aka Server to Server also know as “Client Credentials” token
The grant type is client_credentials it’s literally the word client_credentials. Not sure what you mean by I just don’t understand what client_credentials should be? since the grant_type for The Client Credentials OAuth Flow is client_credentials
POST https://id.twitch.tv/oauth2/token
?client_id=<your client ID>
&client_secret=<your client secret>
&grant_type=client_credentials
Which’ll return JSON blob including an access_token
You then use that access_token in your header that already has the client-id in with your request to helix, as described in the announcment post I linked