Trying to fetch user's subscriptions list

Hi guys, newbie here!

I’m creating an application that needs to know for each user the relative list of active subscriptions.

Actually Twitch API allows you to fetch only a list of subscribers to your channel and there’s no way to obtain a list of user’s active subscriptions (am I right?).

So my idea was to gets a list of all channels followed by a specified user (this is allowed using “…/kraken/users/user ID/follows/channels”) and then, for each followed channel, check if
the user is subscribed to it (using “…/kraken/channels/channel ID/subscriptions/user ID”).

But obviously this will not work when I’m not following users I’m subscribed to (rare use case?).
This is also a time and data consuming solution.

Do you guys have a workaround for this?

I really hope that Twitch guys will implement a command to fetch user’s subscriptions, it would be really useful.

Thanks!

Whats your use case for getting the subscriptions of a user?

As in why are you doing it that way round?

I’m creating a social application and I want users to login with their Twitch account in my app and have all contacts automatically added to their “friend list”. In particular, for each user, I want the friend list to be divided in “users I am following” and “users I am subscribed to”. That’s why I need a list of active subscriptions.

I didn’t get your second question xD

Hmm you are out of luck there then.

Twitch’s API when it comes to subscriptions is geared to “channel subs” and “is user subbed to $given channel”

Theres no official end points for pulling out the friends list either.

And doing it the “get followers and then testing sub” won’t work either as you’d run into rate limit issues under helix I imagine.

The closest you get is https://dev.twitch.tv/docs/v5/reference/users#get-user-emotes which’ll give you the emote set ID.

And then use this API https://twitchemotes.com/apidocs to get the “Emote Set Mapping”. Bit of a hack but thats what you could do right now…

1 Like

Thank you man!

Do you have any idea if this subscriptions list feature will be included in the API anytime soon?

I think that a lot of people would find it useful.

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