In the last week, we’ve seen a massive increase (1000s of errors for about 1000 users) in “The current authorization is not valid for this context” errors. We haven’t changed anything on our end and testing with my personal account works fine. It’s attempting to follow a user on behalf of the user. I can use the token to get the user’s profile though so the token seems to be valid.
When Authing, I get the permissions listed as:
View your email address
Manage your followed channels
View your paid subscriptions
Any idea why this would be happening?
Note: This call has been successful about 30,000 times yesterday so it’s definitely working sometimes. Looks like it’s failing for about 5% of users.
Are you using the old version of the API (V3) instead of the new, V5?
Also, Twitch released a new feature that allows users to change their name, so if you’re using the old API you probably are trying to do something for a user that changed their name and now you don’t have permission because you’re referring the user by their old name.
Note: V3 uses usernames, V5 uses user IDs
We’re just using the https://github.com/dustinlakin/twitch-rb gem. Is that still being maintained?
I’m guessing we’re using the old version. Doing a GET on https://api.twitch.tv:443/kraken/users/21672866/follows/channels returns “User ‘21672866’ does not exist”. How would we go about getting on the new version?
Okay, I’ve got the new version going locally. I guess we’ll fork that gem and upgrade it to v5.
Just to be clear, that gem isn’t maintained by Twitch, so you’d have to talk the author to get it updated to use v5 properly (or fork it as you’re doing).
All good. We’ve forked it and migrated to v5. Working a treat now.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.