Closed WrithemTwine closed 10 months ago
OK, I dug in some more to check what's happening.
When I manually get a token from: https://twitchapps.com/tokengen/, the broadcaster clientId and moderator client Id will properly access GetChatters.
For using refresh token and getting an access token in auth code flow, I checked the response and seeing an older list of scopes instead of the newer scope request. Unsure why (tied to clientId first time scopes are requested?).
Now verified correct scopes and GetChatters responds.
For anyone receiving the same error using Auth Code Grant Flow; I suggest when scopes change (say, have existing tokens, then add-on GetChatters call), clear access & refresh tokens and clear the auth code for the user to reauthenticate access-start the whole auth code grant flow process over again.
I'm also experiencing the very same issue, Reference: Issue 343.
versioning Target: .NET 8
(pseudocode explanation of credentials)
broadcaster_userId != moderator_userId;
broadcaster.IsModerator( moderator_userId ) => true
IsValid(moderator_clientId, moderator_accesstoken) => true
token access scope.Includes( "moderator:read:chatters" ) => true
I even isolated to this code snippet and still get a failed bad token exception.
made sure this was the first TwitchApi instance created in the app, bad token exception