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

Twitch integration broken? #42

Open
onli opened this issue Jun 25, 2020 · 8 comments
Open

Twitch integration broken? #42

onli opened this issue Jun 25, 2020 · 8 comments

Comments

@onli
Copy link

onli commented Jun 25, 2020

To me it seems like the Twitch integration is not working anymore. The Readme points to https://www.twitch.tv/settings/connections, but it seems the application management has moved to https://dev.twitch.tv/console/apps/. It's possible to create an app there and you also get a clientid, but if you set that clientid Twitch complains about the Oauth token:

 2020-06-25T15:38:46.102522+00:00 app[web.1]: 2020-06-25 15:38:46 - TwitchError - 401: {"error":"Unauthorized","status":401,"message":"OAuth token is missing"}:

That's when trying to get a feed for a user.

Did Twitch break the rss box API access, or am I misunderstanding what data needs to be provided?

@stefansundin
Copy link
Owner

Hmm. It appears that it is because of this: https://discuss.dev.twitch.tv/t/requiring-oauth-for-helix-twitch-api-endpoints/23916

For a workaround, use the client-id that this Twitch extension is using (it is in the URL): https://dashboard.twitch.tv/extensions/0qr7fa6llzn4txgnfgb8ipeksd5v24

I will update the code later to make this work with your own Client-ID at some point. Thanks for letting me know!

@stefansundin
Copy link
Owner

stefansundin commented Jun 26, 2020

Oh, looks like they broke embeds too.. is this the warning signs that Twitch is starting to lock down their platform ala Instagram? Boo!

twitch-embed

In the console:

Twitch embed error message:
[NoParent] parent query string value was not specified
Docs: https://dev.twitch.tv/docs/embed/video-and-clips/

So I need to start telling them the website that is embedding with &parent=example.com? What total and utter garbage.

@onli
Copy link
Author

onli commented Jun 27, 2020

That parent parameter is one of the most stupid things I ever saw on the internet. Completely defeats the purpose of embeds - and that in a world where youtube embeds do not need this.

I never saw the feed rssbox would produce for twitch. It would include those embeds?

@stefansundin
Copy link
Owner

Yes, so if your RSS reader supports iframes, you can watch it right there. You also get the embeds if you subscribe to other services, e.g. Twitter and the person tweets a link to a Twitch video or channel.

Apparently the claim is that they need it for CSP headers.. but I don't see why they can't just allow whatever Origin that the web browser sends.. Hmm.. I'll see what I think after I have time to look at it more.

stefansundin added a commit that referenced this issue Jul 6, 2020
@stefansundin
Copy link
Owner

I have worked around the embedding issue now.

@stefansundin
Copy link
Owner

For those hosting themselves, you now have to use:

TWITCHTOKEN_CLIENT_ID=b31o4btkqth5bzbvr9ub2ovr79umhh

@amblerkr
Copy link

amblerkr commented Feb 15, 2022

I created a new app and pasted the client ID, but it doesn't work. The client ID you told me does not work either. Is it completely dead?

@stefansundin
Copy link
Owner

The values that I currently use are:

TWITCH_CLIENT_ID=0qr7fa6llzn4txgnfgb8ipeksd5v24
TWITCHTOKEN_CLIENT_ID=b31o4btkqth5bzbvr9ub2ovr79umhh

You can get the TWITCH_CLIENT_ID value, and other client ids used by twitch.tv itself, by running:

URL=$(curl -sL https://www.twitch.tv/ | grep -oE 'https://static.twitchcdn.net/assets/core-[a-z0-9]+.js')
curl -sL "$URL" | grep -oE '"[a-z0-9]{30}"'

I can't remember why I am not using my own client id anymore..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants