I have created page for ‘connect to twitch’ button, Using it for authenticating user, then send to redirect
uri which is created in app. Till here I have done it using ‘Implicit Grant Method’ of authentication method. Now after this I have to check for user subscription, if user has already subscribed to the channel then move to teamspeak info if not then to subscription page.
But I am not getting user subscription info. I have tried with this
https://api.twitch.tv/kraken/users/test_user/subscriptions/test_channel and also with
but it is giving invalid token error .
Please guide me what wrong I am doing in it?
Make sure you have authenticated with the scope
You can always check the current scope with the Root
thanks for your reply Subspots.
I am using user_read and user_subscriptions both in the scope. But won’t get results.
below displayed is result which I get
[error] => Not Found
[status] => 404
[error] => Unauthorized
[status] => 401
[message] => Token invalid or missing required scope
i tried with different urls which is given in api for getting user’s subscription. but both above url giving 404 and 401 error status.
can you please post any example where you have used it ?
Since you are authenticated as “archonfreak” and not the channel owner “imcoty” you will have to use the user subscription end point:
For example, using the oauth token you supplied in your post: https://api.twitch.tv/kraken/users/archonfreak/subscriptions/imcoty?oauth_token=7vu4yscpol8l1s6dh2acqbv4k9apc3b
vs a channel (lirik) you are not subbed to:
Thanks George. You solved my issue.