Closed bastimeyer closed 4 years ago
sorry, no it still doesnt work.
streamlink 1.2.0 streamlink-twitch-gui 1.8.1 ubuntu linux 18.04 x64
@arrowgent You must have misspelled something or somehow done something else wrong.
I won't be discussing the Twitch API issue here though, so all I can tell you is to follow the instructions precisely or wait for the next release with proper fixes (release date unknown). Both workaround options are working 100% in the mean time.
I got a huge error using --twitch-oauth-token=VALUE
as you describe.
I looked up the command line help and it's --twitch-oauth-token VALUE
(space, not =
). Works great now.
Streamlink, which uses Python's argparse lib, accepts both notations,
--param=value
and --param value
.
If you're using the =
notation, the whole parameter (name and value) needs to be one single argument, which you can wrap into quotation marks. This isn't necessary here though due to the format of the OAuth token. If the parameter value contains spaces or other delimiting characters, it won't work, first because it would split the parameter name and value into two arguments, which can't be done when using the =
notation, and second because the value would simply be wrong, so make sure that what you copy is correct.
The solution works fine for viewing the followed streams but the 'My/Games' menu still shows 410, just to mention it here. Anyway it's too much to ask right now I guess.
PLEASE NOTE This is only a workaround for watching streams via Streamlink. Certain parts of the Twitch GUI still won't work due to this Twitch API issue, but at least you'll be able to browse and launch streams via Streamlink Twitch GUI.
the 'My/Games' menu still shows 410
https://github.com/streamlink/streamlink-twitch-gui/issues/681#issuecomment-553574989
Everything that uses the same private API doesn't work, this includes
If it doesn’t work for you. Check it out - "--param=value". There must be no space after the "" !!! --param=value or --param value.
ok, yes, my problem was in that all the copy/paste required for the workaround an extra space seems to have crept into the field somewhere and that broke using =
. Sorry :)
Thanks for the help, i got this to work with no problems
It works. Thanks OP.
Third party tokens usually last until you revoke permissions of the app which the token has been generated from. You can do this in the connections menu of your Twitch account settings. They also get reset if you generate a new one by logging in again.
Tokens from the Twitch website are valid until you logout there. There is no time limit / expiration date, otherwise you would have to re-login on the website too.
Works perfectly, thanks for your work, Basti.
thank you basti, works on my machine
Works fine here, thanks.
Streamlink 1.3.0 has been released this morning. If you upgrade, you won't need to apply the workaround anymore.
There will also be a new Streamlink Twitch GUI release very soon (probably tomorrow). Streamlink 1.3.0 will be the new min requirement then for launching streams. https://github.com/streamlink/streamlink-twitch-gui/blob/master/CHANGELOG.md
If you don't want to wait, build the Twitch GUI yourself: https://github.com/streamlink/streamlink-twitch-gui/blob/v1.8.1/CONTRIBUTING.md#developing-and-building
@bastimeyer have you considered letting the user log in to twitch inside streamlink where you can capture the user's own api key?
https://passport.twitch.tv/login
returns {"access_token": "...", ...}
upon successful login flow so it should be possible to observe this or modify the calling scripts to extract the response if the login flow is taking place inside streamlink-twitch-gui.
@synap5e The OAuth token from Twitch's website is irrelevant now in Streamlink 1.3.0 as it doesn't make use of auth data anymore (except for logging the user name, which was not removed). See my comment from yesterday on the locked plugin issue thread: https://github.com/streamlink/streamlink/issues/2680#issuecomment-557605851 And in the Twitch GUI, this kind of OAuth token doesn't serve any purpose.
Regarding the auth flow, the Twitch GUI explicitly switched from an internal authentication (with its own client-id) to using a local webserver and letting the user log in via their web browser almost four years ago (see 46cac0b, #209). That has not just been done because of technical issues, but also for security and trust reasons. Authentication happens in the web browser and won't be changed.
Yeah I can understand wanting to steer clear of the security headaches of capturing login and it's an extra maintenance burden.
I have been following the other thread, I just thought capturing login might be a way to avoid breaking access to restricted streams/vods and other features that come with being logged in (or if twitch decides to take action against using their client ID). It's not really an issue for me (I'm happy copying the token from devtools if I need to), just something I thought might be worth suggesting.
Lastly I just wanted to say thanks for the work you do on streamlink. I use it both to watch streams and as a library to resolve .m3u8 playlists for some other projects 😄
v1.9.0
has been released now (currently being built while writing this):
https://github.com/streamlink/streamlink-twitch-gui/releases/latest
As mentioned earlier, Streamlink 1.3.0 has been released yesterday and you don't have to apply this workaround anymore.
Closing the thread. Please upgrade.
Btw, you can keep the custom parameter, but since it's not doing anything anymore, it's probably better to just remove it, in case something changes in the future and you forget about it.
This is an addition to the Streamlink workaround option 2 which I've posted in the Streamlink issue: https://github.com/streamlink/streamlink/issues/2680#issuecomment-552024753
Please read the linked post first, so you know what and why you are doing this. Thanks.
PLEASE NOTE This is only a workaround for watching streams via Streamlink. Certain parts of the Twitch GUI still won't work due to this Twitch API issue, but at least you'll be able to browse and launch streams via Streamlink Twitch GUI.
--twitch-oauth-token=VALUE
Streamlink parameter