You can only get the list of subscribers if the user gives you access to that information using one of our Authentication flows.
First, you’ll need to get an OAuth token with the correct scope for that channel. Second, you’ll call the subscriptions endpoint and pass in that OAuth token. One thing I notice is that you’re requesting a channel_check_subscription scope that doesn’t exist. Scopes are listed with the endpoint in the documentation above.
To me, it seems like seems like you have to request the sub list using the same format as the getInfo variable. Instead of method: 'channel' you’d have something like method: 'subscriptions' and maybe pass the oauth token as an argument.
Btw, it may be in your best interest to secure your clientId so malicious users do not abuse/steal your id.
Check if a user is subscribed to a channel (with authorization by either the user or the channel in question)
The only way to get all subscriptions of a user is the undocumented tickets endpoint:
https://api.twitch.tv/api/users/:login/tickets
I can’t remember the required scope from the top of my head, but I can check later today if you need it.
As always with undocumented endpoints: Use at your own risk. The ticket endpoint is used by the website itself as well as numerous third party services like Streamlabs and BTTV (as I said, it’s the only way to get that kind of information).
To check if user subscribes to a channel, you must use the /users/:user/subscriptions/:channel as your method argument (Don’t forger to replace :user and :channel with the actual values.
The Twitch API Documentation also describes the responses for this endpoint. A channel object is returned if the user is subscribed to the channel and a 404 Not Found error if user is not subscribed.
Also, I’m not sure if this is the library you’re using, but you should check out the examples given to perform more API requests.
@xLukii I deleted that image link since it contains an OAuth token. OAuth tokens are considered secret, and you are responsible for what happens with all OAuth tokens your application uses. Don’t want them leaking out.