So I was polling twitch to see if selected streamers for my community were online. I would return this data and them iframe them on our homepage.
Since the Oauth change now I need to request a token. Does this require you to login to twitch to see the users?
I just want to know if a user is live when people land on my homepage so that our streamers can gain viewership. What would be the best way to do this?
Yes, or use an app access token.
You should put a call from your frontend to your backend and your backend generates, stores, recovers an app access token and call the streams API
And/or use webhooks for streams and/or cache that data so you can avoid making requests to the API if you already have the data
My call im just using JS on the front end to do no backend, so what would be the best case scenario for this?
Ask the user to login, or get a server.
Best solution is the server route so you can utilise server side caching and Twitch Webhooks which’ll make your website quicker, if it doesn’t have to wait on Twitch
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.