401Unauthorized "message": "incorrect user authorization"

We are getting the error ‘incorrect user authorization’. we have obtained the Authorization code from re-direct Uri given in the response of GET authorize request.

If you’re using the Auth Code flow, did you exchange the code that is returned for an Access Token and Refreah token?

yes, i have exchanged authorize code in the token request in order to get access token and refresh token and then use that access token in the request, but the error is still same.

What endpoint are you calling?

https://api.twitch.tv/helix/channels?broadcaster_id=141981764
this one @BarryCarlyon

That endpoint requires no authentication and supports any token type.

As documented here Reference | Twitch Developers

Since you only declared the endpoint and not the method (my fault for not asking what you are trying to do)

I’m assuming you are trying to call the "Get Channel Information endpoint.

So the question is what are you actaully trying to do?

If you are trying to modify a channel title, you’ll need a token from the channel you are trying to modify. So a token for yourself, won’t be able to write to TwtichDev’s channel which is the ID you declared.

yes i am trying to modify channel information. For that i need token of OAuth. I have put correct scope for this endpoint which is = “channel:manage:broadcast” but still having same error.
here is the request curl

curl --location --request PATCH ‘https://api.twitch.tv/helix/channels?broadcaster_id=141981764
–header ‘Authorization: Bearer at8xnvs32ehdhqnrr5un4vvudck4kg’
–header ‘client-id: {{client_id}}’
–header ‘Content-Type: application/json’
–data-raw ‘{
“game_id”: “509670”,
“title”: “there are helicopters in the game? REASON TO PLAY FORTNITE found”,
“broadcaster_language”: “en”
}’

First off, NEVER expose your OAuth tokens. They must be kept secret. Because that was a valid token I’ve gone ahead and revoked it so that it can’t be misused.

Secondly, the token you were attempting to use was for the id 699915193 as it was your own token, so you can’t update channel 141981764 which you specified in the broadcaster_id param because that channel is TwitchDev, and they haven’t given you permission to update their title.

OK thank you so much for information and for revoking the token and i am sorry i sent token unintentionally.
Next time i will be more careful.

4 posts were split to a new topic: Not sure why my authorization is being rejected for my own channel

A post was merged into an existing topic: Not sure why my authorization is being rejected for my own channel

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.