Is the API for checking Subscriptions really working?

Hi,

I have been testing v3 and v5 and “new API”.

Background:
Users logging in to a website
Let users do a web based Authentication using OAuth
Then directly after that we need to check if the user has a subscription of a specifc channel or not.
We need to store that information locally for other purposes.

I have tested.

  • the implicit way of using Client ID and Client Secret
  • I have explored v5 and v3 calls as well

I have some access not logged in
I have some more access logged in
There seem to be slightly more access providing an OAuth token

channnel/:channel/follows - works fine

channnel/:channel/subscriptions- does not work

The first user id + channel id do not have a subscription enabled.

Then I got credentials from a friend -which subscribes to a third channel.
Same issue

In Postman:

https://api.twitch.tv/kraken/channels/:xxxx/subscriptions?oauth_token=amagicoauthtokenstring
{
“error”: “Unprocessable Entity”,
“status”: 422,
“message”: “ZZZZ does not have a subscription program”
}

I tested Python - Client as well - same issue accessing subscriptions

I have implemented a PHP script that do that 2 step OAuth dance to finally get an access token which I use to call the server in ex. the sample above.

I have tried the other way as well /user/:user/subscriptions/:subscription … same issue with security
mostly 401

I started to wonder if thar response below is actually correct:
{
“error”: “Unprocessable Entity”,
“status”: 422,
“message”: “ZZZZ does not have a subscription program”
}

Questions:

  • how to test that API if you not have Subcriptions enable or subscribers ?
  • If I would have had Subscriptions and subscribers - would the sample have worked and provided me with a succesful response of subscribers

Any tips or ideas are welcome !

Best regards Tommy

/kraken/channels/:channel/subscriptions gets a list of people who are subscribed to that channel (channel_subscriptions). The channel obviously needs to have a subscription program for this to work. You cannot really test it without having access to such channel.

/kraken/users/:user/subscriptions/:channel gets user’s subscription to a channel, with the user’s oauth (user_subscriptions).

/kraken/channels/:channel/subscriptions/:user gets user’s subscription to a channel, with the channel’s oauth (channel_subscriptions).

3 Likes

Thanx for the clarification !

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