Skip to content

Commit

Permalink
components: remove follow+subscribe buttons
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bastimeyer committed Aug 3, 2021
1 parent 27ee423 commit 402cab1
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 1,052 deletions.
14 changes: 0 additions & 14 deletions src/app/data/models/twitch/subscription/model.js

This file was deleted.

22 changes: 0 additions & 22 deletions src/app/data/models/twitch/subscription/serializer.js

This file was deleted.

10 changes: 2 additions & 8 deletions src/app/locales/de/components.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
channel-button:
title: "{name} folgen"
channel-item:
game-missing: kein Spiel ausgewählt
documentation-link:
Expand All @@ -9,11 +11,6 @@ file-select:
flag-icon:
channel: "Die Sprache des Kanals ist {lang}"
broadcaster: "Die Sprache des Broadcasters ist {lang}"
follow-button:
follow: "{name} folgen"
unfollow: "{name} nicht mehr folgen"
confirm: "{name} nicht mehr folgen"
keep: "{name} weiterhin folgen"
infinite-scroll:
error: Fehler
loading: Lade
Expand Down Expand Up @@ -85,9 +82,6 @@ stream-item:
lock: Detailansicht sperren
unlock: Detailansicht entsperren
vodcast: Vodcast
subscribe-channel:
title-new: "{name} jetzt abonnieren"
title-renew: "Abonnement von {name} erneuern"
team-item:
created-at:
title: "Erstellt am"
Expand Down
10 changes: 2 additions & 8 deletions src/app/locales/en/components.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
channel-button:
title: "Follow {name}"
channel-item:
game-missing: no game set yet
documentation-link:
Expand All @@ -9,11 +11,6 @@ file-select:
flag-icon:
channel: "The channel's language is {lang}"
broadcaster: "The broadcaster's language is {lang}"
follow-button:
follow: "Follow {name}"
unfollow: "Unfollow {name}"
confirm: "Unfollow {name}"
keep: "Keep following {name}"
infinite-scroll:
error: Error
loading: Loading
Expand Down Expand Up @@ -85,9 +82,6 @@ stream-item:
lock: Lock details view
unlock: Unlock details view
vodcast: Vodcast
subscribe-channel:
title-new: "Subscribe to {name} now"
title-renew: "Renew subscription to {name}"
team-item:
created-at:
title: "Date created"
Expand Down
10 changes: 2 additions & 8 deletions src/app/locales/fr/components.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
channel-button:
title: "Suivre {name}"
channel-item:
game-missing: pas de jeu configuré
documentation-link:
Expand All @@ -9,11 +11,6 @@ file-select:
flag-icon:
channel: "La langue de la chaîne est {lang}"
broadcaster: "La langue du diffuseur est {lang}"
follow-button:
follow: "Suivre {name}"
unfollow: "Ne plus suivre {name}"
confirm: "Ne plus suivre {name}"
keep: "Continuer à suivre {name}"
infinite-scroll:
error: Erreur
loading: Chargement
Expand Down Expand Up @@ -85,9 +82,6 @@ stream-item:
lock: Verrouiller la vue de détails
unlock: Déverrouiller la vue de détails
vodcast: Vodcast
subscribe-channel:
title-new: "S'abonner à {name} maintenant"
title-renew: "Renouveler l'abonnement à {name}"
team-item:
created-at:
title: "Date de création"
Expand Down
10 changes: 2 additions & 8 deletions src/app/locales/pt-br/components.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
channel-button:
title: "Seguir {name}"
channel-item:
game-missing: nenhum jogo definido
documentation-link:
Expand All @@ -9,11 +11,6 @@ file-select:
flag-icon:
channel: "O idioma do canal é {lang}"
broadcaster: "O idioma de transmissão é {lang}"
follow-button:
follow: "Seguir {name}"
unfollow: "Não seguir {name}"
confirm: "Não seguir {name}"
keep: "Continuar seguindo {name}"
infinite-scroll:
error: Erro
loading: Carregando
Expand Down Expand Up @@ -85,9 +82,6 @@ stream-item:
lock: Travar a visualização de detalhes
unlock: Destravar a visualização de detalhes
vodcast: Vodcast
subscribe-channel:
title-new: "Inscrever para {name} agora"
title-renew: "Renovar inscrição para {name}"
team-item:
created-at:
title: "Data de criação"
Expand Down
10 changes: 2 additions & 8 deletions src/app/locales/ru/components.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
channel-button:
title: "Отслеживать {name}"
channel-item:
game-missing: Игра не указана
documentation-link:
Expand All @@ -9,11 +11,6 @@ file-select:
flag-icon:
channel: "Язык канала: {lang}"
broadcaster: "Язык стримера: {lang}"
follow-button:
follow: "Отслеживать {name}"
unfollow: "Отписаться от {name}"
confirm: "Отписаться от {name}"
keep: "Продолжать отслеживать {name}"
infinite-scroll:
error: Ошибка
loading: Загрузка
Expand Down Expand Up @@ -85,9 +82,6 @@ stream-item:
lock: Закрепить подробности
unlock: Открепить подробности
vodcast: Повтор (VOD)
subscribe-channel:
title-new: Подписаться (платно) на {name}
title-renew: Обновить подписку (платную) на {name}
team-item:
created-at:
title: "Дата создания"
Expand Down
10 changes: 2 additions & 8 deletions src/app/locales/zh-tw/components.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
channel-button:
title: "追隨 {name}"
channel-item:
game-missing: 尚未設定遊戲
documentation-link:
Expand All @@ -9,11 +11,6 @@ file-select:
flag-icon:
channel: "頻道語言: {lang}"
broadcaster: "實況主語言: {lang}"
follow-button:
follow: "追隨 {name}"
unfollow: "停止追隨 {name}"
confirm: "確認停止追隨 {name}"
keep: "繼續追隨 {name}"
infinite-scroll:
error: 錯誤
loading: 載入中
Expand Down Expand Up @@ -85,9 +82,6 @@ stream-item:
lock: 鎖定詳細資訊
unlock: 解鎖詳細資訊
vodcast: VOD
subscribe-channel:
title-new: "立即訂閱 {name}"
title-renew: "更新訂閱 {name}"
team-item:
created-at:
title: "建立日期"
Expand Down
82 changes: 0 additions & 82 deletions src/app/ui/components/-mixins/twitch-interact-button.js

This file was deleted.

Loading

0 comments on commit 402cab1

Please sign in to comment.