Need more granularity with subscriptions endpoints

Currently, the /channels/:channel/subscriptions endpoint is the only way (that I have found or know about) to return number of subscribers for a partnered stream. Unfortunately, it also gives direct access to a full list of the subscribers to do so.

With so many third party sites starting to offer information or services to partners based on “number of subscribers,” it would be greatly appreciated (as both a developer and a partner) to have these two mechanisms completely separated.

(if I’ve missed a way to return “just the subscriber count,” I’d love to know about it, so I can tell the services that want access to my sub-list how to go about it).

Having /channels/:channel/subscriptions continue to return lists of subscribers with a channel_subscriptions scope continues to make sense. There is no reason to change how this works.

However, adding a new scope (e.g. channel_subscriptions_count) that adds a new field to the root /channels/:channel/ endpoint - or restricts the list provided via the /channels/:channel/subscriptions endpoint - would be a godsend.

For example, if you access the /channels/:channel/ endpoint without the appropriate (new) scope, you would get the usual data:


curl -H ‘Accept: application/vnd.twitchtv.v3+json’
-X GET https://api.twitch.tv/kraken/channels/test_channel

{
“_id”: 12345,
“name”: “test_channel”,

“partner”: true,
“url”: “http://www.twitch.tv/test_channel”,
“views”: 49144894,
“followers”: 215780,
“_links”: { … }
}

If, however, you load the endpoint, authenticated and with a new channel_subscriptions_count scope then you would see an extra subscribers field that contains the total current count of active subscriptions to that channel:


curl -H ‘Accept: application/vnd.twitchtv.v3+json’
-H ‘Authorization: OAuth <access_token>’
-X GET https://api.twitch.tv/kraken/channels/test_channel

{
“_id”: 12345,
“name”: “test_channel”,

“partner”: true,
“url”: “http://www.twitch.tv/test_channel”,
“views”: 49144894,
“followers”: 215780,
“subscribers”: 3,
“_links”: { … }
}

Alternately, accessing /channels/:channel/subscriptions with only the new channel_subscriptions_count scope (and NOT the channel_subscriptions scope) could return only the total and NOT the list:


curl -H ‘Accept: application/vnd.twitchtv.v3+json’
-H ‘Authorization: OAuth <access_token>’
-X GET https://api.twitch.tv/kraken/channels/test_channel/subscriptions

{
“_total”: 3,
“_links”: { … }
}

Either of these solutions would make providing that ‘number’ to potential service providers significantly safer (insofar as not having to provide them access to a full list of users that we may not want them to have or that they may misuse), requires only a single additional scope for the trouble and is provided through a mechanism that they’re undoubtedly already using (and that also consistently verifies partnership status with the partner= boolean in the case of the channel endpoint).

Regardless of how this mechanism is separated, it’s sorely needed, if only for the ability to better control who has access to our subscriber lists over and above the count.

Thanks.
-Myr.

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