Thanks to visit codestin.com
Credit goes to github.com

Skip to content

plugins.twitch: new access_token GQL query#6720

Merged
bastimeyer merged 2 commits into
streamlink:masterfrom
bastimeyer:plugins/twitch/new-access-token-gql-query
Nov 11, 2025
Merged

plugins.twitch: new access_token GQL query#6720
bastimeyer merged 2 commits into
streamlink:masterfrom
bastimeyer:plugins/twitch/new-access-token-gql-query

Conversation

@bastimeyer

Copy link
Copy Markdown
Member

Fixes #6719

Twitch has changed/replaced their persisted GQL API query for getting the streaming access token. The new one also expects a new parameter, platform, which can be overridden via --twitch-access-token-param, just like the playerType one (e.g. "frontpage" instead of the default "embed", which sometimes prevents preroll ads).

Live, VOD and clips seem to be working:

$ ./script/test-plugin-urls.py twitch -m -r CHANNELNAME shroud
:: https://clips.twitch.tv/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4
::  360p30, 480p30, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://player.twitch.tv/?parent=twitch.tv&channel=shroud
::  audio_only, 160p, 360p, 480p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://player.twitch.tv/?parent=twitch.tv&video=1963401646
::  audio, 160p, 360p, 480p, 720p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://player.twitch.tv/?parent=twitch.tv&video=1963401646&t=1h23m45s
::  audio, 160p, 360p, 480p, 720p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://twitch.tv/papaplatte/clip/SmellyDeadMomBloodTrail-WWr5gMxd0pe0BAge
::  360p30, 480p30, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/clip/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4
::  360p30, 480p30, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/dota2ti/v/1963401646
::  audio, 160p, 360p, 480p, 720p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/dota2ti/video/1963401646
::  audio, 160p, 360p, 480p, 720p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/lirik/clip/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4
::  360p30, 480p30, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/shroud
::  audio_only, 160p, 360p, 480p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/shroud/
::  audio_only, 160p, 360p, 480p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/shroud/?
::  audio_only, 160p, 360p, 480p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/shroud?
::  audio_only, 160p, 360p, 480p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/videos/1963401646
::  audio, 160p, 360p, 480p, 720p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}
:: https://www.twitch.tv/videos/1963401646?t=1h23m45s
::  audio, 160p, 360p, 480p, 720p, 720p60, 1080p60, worst, best
::   {'id': None, 'author': None, 'category': None, 'title': None}

Considering the timing of this change with breaking changes already merged into master and the significance of the Twitch plugin, this probably means that the 8.0.0 release needs to be done sooner. I don't expect many users installing pre-release builds or sideloading the updated plugin. Annoying...

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Nov 11, 2025
@bastimeyer

Copy link
Copy Markdown
Member Author

The metadata seems broken, btw. Going to fix the separately...

@bastimeyer

Copy link
Copy Markdown
Member Author

The clips metadata seems to have moved to a different query. If this is the case (I couldn't find ClipsView or ClipsTitle), then this also requires an update of the validation schema. I'm therefore leaving this out for now and will fix this later.

Going to merge these important changes now.

Preview builds (Windows and Linux AppImages) will be triggered upon merge:

Otherwise, install from master via pip (or related tools):

@bastimeyer bastimeyer merged commit d4f13f6 into streamlink:master Nov 11, 2025
18 checks passed
@bastimeyer bastimeyer deleted the plugins/twitch/new-access-token-gql-query branch November 11, 2025 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin issue A Plugin does not work correctly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugins.twitch: PersistedQueryNotFound - stream doesn't start

1 participant