API Possibilities

Hey there,

For a project, I’m trying to fetch raw Twitch data to show basic API capabilities

With the Twitch API, am I able to do the following?

  1. Authentication - Allow Twitch streamers to authenticate with their Twitch accounts for verification purposes (e.g login via twitch to show that this user has successfully connected)

  2. Disconnection - Allow those same streamers to disconnect their connected accounts (e.g you are successfully disconnected)

  3. Activity Status - See when a non-connected streamer is live. Or do they have to be authenticated via Twitch login?

  4. Data - Fetch live viewer counts for non authenticated streamers. Or is this only possible if they’re authenticated via Twitch login?)

  5. Additional Data - Fetch a list of recent live stream categories for said Twitch streamer

  6. Rate Limits - Theoretically speaking, how does one hit a rate limit? Could say 10,000 streamers all authenticate their accounts with a 3rd party site within an hour and still be good? If that 3rd party site checks the live status and view count of those 10,000 steamers every minute, would that be good to? Then follow up question, are there paid API tiers for additional requests per minute?

Thanks!

https://dev.twitch.tv/docs/authentication/

Disconnection has to be done by the user through their Connections page on Twitch, it can’t be handled by 3rd parties such as your site.

https://dev.twitch.tv/docs/api/reference/#get-streams stream data is public, it doesn’t require any scopes, so you can get that for all users regardless of if they’ve connected to your app or not.

See previous answer.

https://dev.twitch.tv/docs/api/reference/#get-videos will return a list of VoDs for a user, but it will only show the category at the time the stream went live, so this may not give you a full list of categories. If you want accurate data you would need to capture it yourself in real time.

Authentication limits aren’t publicly documented, but is not something apps should be concerned about unless you’re doing something you shouldn’t.
Also, when a user auths to your app their User Token will have its own rate limits, separate from other users tokens, and additionally some things such as when a stream goes online/offline can be done over EventSub which doesn’t require you to use your API Rate Limit.

Thanks so much for the reply! This is all new to me, so I really appreciate your help :blush:

Regarding those rate limits, so that shouldn’t be an issue right? I could fetch a streamer’s live status, display name, profile picture, and channel link and that wouldn’t be an issue?

Are you basically saying if the information is public on their channel, they wouldn’t need to authenticate?

Lastly, is there a way to fetch that public information each day for everyone who has streamed in the last 30 days on Twitch?

Like if I wanted to output a list of everyone in the last 30 days who has streamed on Twitch for the Fortnite category, I could display their channel links, profile pics, and names?

And I could fetch this info daily without hitting rate limits?

Each OAuth token has a default rate limit of 800 requests per minute, so each user who authenticates with your app you would be using their token for requests about them, and you shouldn’t be anywhere near 800 requests/min. So no, that wouldn’t be an issue.

Correct. You would only need a user to authenticate if you need them to grant permissions to access certain things (such as email, or channel subscribers, etc…)

For the most part historic information isn’t provided by the API. If you want to know who streams in the last 30 days, you would need to periodically call the Get Streams endpoint, go through all the pages and store the channels that are live, and keep doing that every few minutes, every day, for 30 days, and then you’ll have data for who streamed in the last 30 days.

Sure, collect the data yourself in real time, then when you want to get their profile pics and channel names you would call the Get Users endpoint on those users to get user information.

Sure.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.