is it possible with the current API version to fetch public visible channel stats (like follower count) without the authorization of the channel owner? I’m planning to develop an analytics tool that tracks the follower stats of some channels but I’m wondering if that is possible without forcing the user to redirect to the twitch login page for the token.
You can use the Get Usesr Follows endpoint to get the number of followers a channel has, or how many channels a user is following without needing the user the grant any permission as the endpoint doesn’t require a scope.
Thank you! I managed to implement it now, using the token of my own channel.
Do I have to re-generate the token or it is enough to generate one and use that forever? Is there any expiration?
When you generate a token an
expires_in is returned which tells you in how many seconds a token expires.
Alternatively you can check the current expiration with the validate endpoint Authentication | Twitch Developers
Is it possible to refresh the token automatically? Currently, I have a token which I got when I authenticated with my own channel (that token allows me to fetch the follower count of other channels as well). Basically, I want to refresh the token without having to authenticate manually.
If you stored the refresh token, refer to “Refreshing Access Tokens”
Depending on which userflow you run will determine if you have one.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.