How to find user subs after authorization?

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 and also with[token generated]
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 user_subscriptions.

You can always check the current scope with the Root / endpoint:

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


stdClass Object
[error] => Not Found
[status] => 404
[message] =>

stdClass Object
[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: GET /users/:user/subscriptions/:channel

For example, using the oauth token you supplied in your post:

vs a channel (lirik) you are not subbed to:

Thanks George. You solved my issue.