-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix: investigate credentials, OAuth issues #31
Comments
Beware! SendTwitchAPIRequest(string request)
The value of In my uncommitted code, the JSON response to SendTwitchAPIRequest is I had disabled the IsTwitch() function call, but re-enabling it did not change the outcome. Twitch's new API compares the provided OAuth token to its implicit ClientID on the server, ignoring the ClientID supplied in the header. The ClientID acquired via Now that I supply a matching ClientID and OAuth token, the JSON web response is I had forgotten that I added the ability to (wrongly) replace the Authorization token with the OAuth token. After fixing every other issue, |
GraphQL is a curse. |
refresh_token
to avoid using expired credentials.The current GraphQL request is typically responded to with either
{"error":"Unauthorized","status":401,"message":"The \"Authorization\" token is invalid."}
or{"error":"Bad Request","status":400,"message":"The \"Client-ID\" header is invalid."}
. When supplied with a "real" pair of Client-ID and Authorization (acquired via Firefox developer tools in Networking tab),PlayitemParse
is able to continue correctly......untilEthereal issue. Possibly due to networking conditions.string sourceQualityUrl = "https://" + HostRegExpParse(jsonM3u8, "https://([a-zA-Z-_.0-9/]+)" + m3) + m3;
where the string is assigned 'https://.m3u8'.HostRegExpParse(jsonM3u8, "https://([a-zA-Z-_.0-9/]+)" + m3)
returns an empty string.tl;dr
The script then breaks while building the sourceQualityUrl. The regular expression method returns an empty string.Did not occur again when retrying with the same code.To investigate with plentiful debug output (and some leaked sensitive information!),
git clone https://github.com/BinToss/23rd.TwitchPotPlayer/tree/feature/improve-debug-output.git
"./BinToss/23rd.TwitchPotPlayer/"Unofficial Twitch GraphQL API references
Original post
Additionally, the default OAuth token already has the "oauth:" prefix and is causing Access Denied errors.<- See #32When TwitchPotPlayer's MediaPlayParse config.ini ends with...
useOwnCredentials=0
then...
However, when
then...
The next issue I need to investigate is...
Why does PotPlayer fail to fetch the Twitch's MP4-based media streams?
Related Issues
The text was updated successfully, but these errors were encountered: