Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow/unfollow channel API endpoints have been removed by Twitch on 2021-07-27 #813

Closed
4 tasks done
arrowgent opened this issue Jul 31, 2021 · 9 comments
Closed
4 tasks done

Comments

@arrowgent
Copy link

arrowgent commented Jul 31, 2021

Checklist

Streamlink Twitch GUI version

v1.9.1

Streamlink version

v1.7.0

Operating system, environment and configuration details

Ubuntu 18.04

Description

according to Chatty
/follow reports:
Note: Twitch planned to remove follow/unfollow functionality from their API on July 27, 2021.

i know im using an old streamlink & streamlink-twitch-gui
but now it seems clicking Follow in streamlink-twitch-gui does not work

i did a quick issues search for "follow" to see if any bugs were reported about this
i dont see anything recent in commits about "follow"
if nothing else, to bring it to attention
otherwise disreguard, and my apology for using an old version...

thanks!

Debug log

No response

@bastimeyer
Copy link
Member

bastimeyer commented Aug 1, 2021

https://dev.twitch.tv/docs/change-log

Date Documentation Changes
2021‑07‑27 The Create and Delete Follows API endpoints have been removed. See the Deprecation of Create and Delete Follows API Endpoints announcement for more information.

Announcement thread here:
https://discuss.dev.twitch.tv/t/deprecation-of-create-and-delete-follows-api-endpoints/32351


Twitch has killed the follow users/channels endpoints on both public APIs, kraken and helix, because of abusive/harrassing "follow-bots".

There is no way for legitimate 3rd party applications to fix or work around that other than trying to use the private GQL API from their website, similar to what abusive bot developers will now have to do, or making the user visit Twitch's website to follow/unfollow channels manually in their web browser.

Unfortunately, I have not heard of this removal until just now, otherwise I would've reacted to this sooner. I've commented on the announcement thread, and as you can see on there, someone already opened a suggestion thread on Twitch's feedback tracker which suggests an implementation of developer approvals and restoring the removed API endpoints for approved developers.


As an end-user of Streamlink Twitch GUI, voting on this suggestion thread is probably all you can do for now to help with this situation.

https://twitch.uservoice.com/forums/310213-developers/suggestions/43871391-twitch-approved-developer-program-reinstate-foll


In the mean time, I will have to think what I can do until this has been resolved by Twitch. I am not sure if it will though, because it is Twitch after all. This is really sad.

@arrowgent
Copy link
Author

arrowgent commented Aug 1, 2021

thanks, im glad it wasnt just me.

also since it doesnt seem likely to get re-implemented
possibly moving forward with removing the follow button functionaliy
while adding a notification on screen about it's deprecation
for the next streamlink-twitch-gui release

good luck guys!

@bastimeyer
Copy link
Member

I haven't made a decision yet whether I want to remove it completely (and the sub button along with it), or whether I should let the user decide if they want to open the channel's page on Twitch.tv in their web browser. The web browser workaround is pretty ugly from a usability standpoint, but for now this is the only solution to at least be able to follow or unfollow channels.

There also hasn't been a response yet from Twitch regarding the approved developer suggestion, so waiting for a bit first won't hurt, as the missing API endpoints don't break anything in the Twitch GUI and it handles it correctly with its response failure logic. It's just annoying, but that won't change if the follow buttons get removed or replaced with a "workaround".

This whole debacle also made me wonder whether I should re-implement the features which got removed in the past due to the switch to their GQL API on their website, like channel panels for example. I've been avoiding this in Streamlink Twitch GUI because it's not a public API and didn't want to abuse their services (in Streamlink there simply is no other way to get the data), but I'm at a point now where I don't really care anymore, just like they don't care about their 3rd party devs.

@bastimeyer bastimeyer changed the title Note: Twitch planned to remove follow/unfollow functionality from their API on July 27, 2021. Follow/unfollow channel API endpoints have been removed by Twitch on 2021-07-27 Aug 2, 2021
@bastimeyer bastimeyer pinned this issue Aug 2, 2021
@arrowgent
Copy link
Author

for sure i can understand developers frustrations, and users.
approved developers should be on a mailing list about important events, etc etc.

also i see twitch's point about the api being removed....they want to remove bots ability... great

meanwhile 40 minutes ago i watched a bot trigger 120 spams of streamlabs saying "thanks for the follow"

[10:00:31] @'?^Streamlabs: Thank you for following standbyforce8!
x120x
[10:00:40] @'?^Streamlabs: Thank you for following appellantprocurement6!

so...yeah twitch /follow api might be removed, but certaintly didnt stop the follow bots!

wow actually happened again 5 minutes ago, this time i verified the user's +120 followers
so they arent just attacking streamlabs bot api

and how about finding a way to stop bots from being created to begin with?
or monitoring the fact that bots are in more than 50 channels simultaneously?
anotherttvviewer | 9,332 - Currently In x Amount Of Live Channels
etc, all publically viewable

irreguardless.....

if you can use the GQL api, if its even possible... might be great to move forward
also considering kraken v5 is going away
https://blog.twitch.tv/en/2021/07/15/legacy-twitch-api-v5-shutdown-details-and-timeline/
then youre left with helix....

and yes i wholly agree, the reason we use some 3rd party tools is because with want options, lightweight, feature rich, open source & crossplatform alternatives
i strongly started to dislike the Browser version twitch which helped me find streamlink/streamlink-twitch-gui
i dont miss having channel points, extensions, all that fancy jazz... just give me chat & video. simple.

bastimeyer added a commit that referenced this issue Aug 4, 2021
See #813

Twitch has decided to completely remove the endpoints for following and
unfollowing channels on both their kraken and helix public APIs.

Their reason for this is that there are follow-bots which are abusing
the public APIs by mass-following channels or bots which have been
created for harassing streamers who use follow alerts in their streams.

Instead of implementing ways to prevent abuse of these endpoints, like
for example rate-limiting create/delete requests, either for entire
client-IDs (registered applications) or individual OAuth tokens (user
logins in a registered application), and/or limiting follow and unfollow
requests in quick succession, either by caching requests or by adding a
time threshold based on the follow date, Twitch simply went the easy
route and killed the entire system which regular 3rd party developers
rely on. They are thus showing all these developers their middle finger.
This is not a surprise, as Twitch has been actively neglecting their
public APIs ever since they switched to the GraphQL-based one on their
website. Past actions regarding the public APIs have shown this as well.

For Streamlink Twitch GUI this unfortunately means that the buttons for
following and unfollowing channels have to be removed, as there's no way
of working around this API endpoint removal.

Abusive follow-bots will however still be able to use the GraphQL API
and work around the removal this way, but applications like this which
operate entirely on the public APIs and where user logins are tied to
the application's client-ID (which is limited to the public APIs) will
not be able to switch to the private GraphQL API for re-implementing the
follow buttons. The only possible way would be asking the user to copy
their secret OAuth token from the dev-tools of their web browser after
logging in on Twitch.tv, or writing an extension for every popular web
browser out there which would do this on its own and asking the user to
install it. The OAuth token from the GraphQL API could then be used as a
secondary way to authenticate the user, so that they could follow
channels again by using GraphQL API endpoints instead. Even following
games would be possible again, because these endpoints were never added
to kraken or helix and in the past only lived on Twitch's old private
REST API (similar to kraken) which has been shut down years ago. All of
this is however off the table, as it's way too inconvenient for the user
and is also too much work to write and maintain. Not to mention that it
would abuse Twitch's private API, which should be avoided.

As a way to make the user still be able to follow and unfollow channels
when using Streamlink Twitch GUI, a new button has been implemented
which simply opens the channel page on Twitch.tv in the user's browser,
like the subscribe button already did. Since it doesn't make much sense
having two buttons which do the same thing, this commit therefore also
removes the subscribe button. Both the follow and subscribe buttons have
shared a mixin with logic for checking the followed/subsciption status
of the user, so this has been removed as well.

In case that the Twitch developers see that their idea of killing the
API endpoints was a bad idea and didn't work out as expected (as abusive
bots are still doing their thing), this change can simply be reverted,
but this probably won't happen any time soon, or at all.

There are suggestions on Twitch's feedback tracker to grant "approved"
applications (client-IDs) or 3rd party developers (accounts with
registered applications) access back to these API endpoints, but it is
unclear whether Twitch will implement such an approval system or whether
they choose a cheap workaround instead which doesn't fit into
applications like Streamlink Twitch GUI and the like.
bastimeyer added a commit that referenced this issue Aug 4, 2021
See #813

Twitch has decided to completely remove the endpoints for following and
unfollowing channels on both their kraken and helix public APIs.

Their reason for this is that there are follow-bots which are abusing
the public APIs by mass-following channels or bots which have been
created for harassing streamers who use follow alerts in their streams.

Instead of implementing ways to prevent abuse of these endpoints, like
for example rate-limiting create/delete requests, either for entire
client-IDs (registered applications) or individual OAuth tokens (user
logins in a registered application), and/or limiting follow and unfollow
requests in quick succession, either by caching requests or by adding a
time threshold based on the follow date, Twitch simply went the easy
route and killed the entire system which regular 3rd party developers
rely on. They are thus showing all these developers their middle finger.
This is not a surprise, as Twitch has been actively neglecting their
public APIs ever since they switched to the GraphQL-based one on their
website. Past actions regarding the public APIs have shown this as well.

For Streamlink Twitch GUI this unfortunately means that the buttons for
following and unfollowing channels have to be removed, as there's no way
of working around this API endpoint removal.

Abusive follow-bots will however still be able to use the GraphQL API
and work around the removal this way, but applications like this which
operate entirely on the public APIs and where user logins are tied to
the application's client-ID (which is limited to the public APIs) will
not be able to switch to the private GraphQL API for re-implementing the
follow buttons. The only possible way would be asking the user to copy
their secret OAuth token from the dev-tools of their web browser after
logging in on Twitch.tv, or writing an extension for every popular web
browser out there which would do this on its own and asking the user to
install it. The OAuth token from the GraphQL API could then be used as a
secondary way to authenticate the user, so that they could follow
channels again by using GraphQL API endpoints instead. Even following
games would be possible again, because these endpoints were never added
to kraken or helix and in the past only lived on Twitch's old private
REST API (similar to kraken) which has been shut down years ago. All of
this is however off the table, as it's way too inconvenient for the user
and is also too much work to write and maintain. Not to mention that it
would abuse Twitch's private API, which should be avoided.

As a way to make the user still be able to follow and unfollow channels
when using Streamlink Twitch GUI, a new button has been implemented
which simply opens the channel page on Twitch.tv in the user's browser,
like the subscribe button already did. Since it doesn't make much sense
having two buttons which do the same thing, this commit therefore also
removes the subscribe button. Both the follow and subscribe buttons have
shared a mixin with logic for checking the followed/subsciption status
of the user, so this has been removed as well.

In case that the Twitch developers see that their idea of killing the
API endpoints was a bad idea and didn't work out as expected (as abusive
bots are still doing their thing), this change can simply be reverted,
but this probably won't happen any time soon, or at all.

There are suggestions on Twitch's feedback tracker to grant "approved"
applications (client-IDs) or 3rd party developers (accounts with
registered applications) access back to these API endpoints, but it is
unclear whether Twitch will implement such an approval system or whether
they choose a cheap workaround instead which doesn't fit into
applications like Streamlink Twitch GUI and the like.
@bastimeyer
Copy link
Member

402cab1 has been merged into master.
See the commit message for the details.

There will be a new release within the next couple of days. I'm not yet sure whether I want to add a message to the app that clarifies the situation, because most people won't read the changelog, but I also don't want to be too annoying with it.

I'll leave this issue open and pinned for a while, so that there won't be any duplicates.


if you can use the GQL api

Not possible for auth related stuff like following channels or games. I only mentioned it because of channel panels, which were removed in the past when Twitch shut down their old private API where this data could be retrieved from.

considering kraken v5 is going away

I am aware of this. Switching to helix will be a lot of work and that needs to be done as the next step after the next release. I've already started working on that a few months ago, but only a bit.

@ahmedtds
Copy link

ahmedtds commented Aug 17, 2021

That is very annoying. i was using follow & unfollow both via your app and chatty a lot. I mean I don't even remember when was the last time I followed or unfollowed someone from web. Years ago probably. Very inconvenient. Shame on Twitch..

@simonsan
Copy link

considering kraken v5 is going away

I am aware of this. Switching to helix will be a lot of work and that needs to be done as the next step after the next release. I've already started working on that a few months ago, but only a bit.

@bastimeyer
https://github.com/Emilgardis/twitch_api2 supports Helix API

Maybe using some of these could enable you to create easily maintainable node.js modules (e.g. Twitch Clients) using Rust:
https://github.com/neon-bindings/neon
https://github.com/napi-rs/napi-rs

Just as an idea. Thanks for the great work!

@bastimeyer
Copy link
Member

These libs are completely irrelevant.

Twitch has removed the API endpoints for following channels. Simple as that. There is no way to follow a channel via kraken (shutdown at the end of February) AND helix (see #849 and #852).

The only "workaround" would be implementing their GraphQL API that's used on their website, but this isn't possible without major drawbacks, because users would need to get their personal OAuth token from their web browser's dev tools after logging in on the Twitch.tv website (or a web browser extension would need to be written).

I've already commented on all of this plenty of times. It's not possible and all users can do is ask Twitch to bring the API endpoints back. There's a feature request linked above, but I'll link it here again:
https://twitch.uservoice.com/forums/310213-developers/suggestions/43871391-twitch-approved-developer-program-reinstate-foll

Locking, as there's nothing to be discussed here and I don't want to have this thread growing unnecessarily, because it'll bury the relevant informations.

@streamlink streamlink locked and limited conversation to collaborators Jan 16, 2022
@bastimeyer
Copy link
Member

Closing the thread, as there's nothing that can be done apart from voting, and even then it's very unlikely that Twitch will re-introduce this.
https://twitch.uservoice.com/forums/310213-developers/suggestions/43871391-twitch-approved-developer-program-reinstate-foll

As I mentioned in #856, it's possible that a follow channels+games feature could be implemented locally in the future without relying on Twitch accounts. Logins would however still be necessary, because it's a requirement of the Twitch helix API.

@bastimeyer bastimeyer unpinned this issue Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants