livecoders / website

Website for the Live Coders Twitch Team
https://livecoders.dev
MIT License
52 stars 74 forks source link

Live Channels listing on frontpage #8

Open lannonbr opened 4 years ago

lannonbr commented 4 years ago

Have the ability to see live channels on the frontpage. At the bottom of the listing have a link over to the team members listing

ThindalTV commented 2 years ago

We need to look into permissions regarding sharing application client id and a daily generated oauth token(ie we'd generate it on daily CD build). If it's something we can do, then this is how to do it:

Get oauth token: POST https://id.twitch.tv/oauth2/token?client_id=&client_secret=&grant_type=client_credentials This would be called from CD script and the access_token return field stored. https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#client-credentials-grant-flow

GET https://api.twitch.tv/helix/streams?user_login=Member1&user_login=Member2&user_login=Member3 Call this on the client side. Requires the HTTP headers Client-id, which is constant for us, and Authorization Bearer from above. Will return a list of up to 100 channels. https://dev.twitch.tv/docs/api/reference#get-streams