# Scope permisison to /subscritions api

**URL:** <https://discuss.dev.twitch.com/t/scope-permisison-to-subscritions-api/43056>\
**Category:** API\
**Created:** [January 26, 2023, 1:32pm UTC](https://discuss.dev.twitch.com/t/scope-permisison-to-subscritions-api/43056 "2023-01-26T13:32:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_Carvalho](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/juan_carvalho/32/22143_2.png) [@Juan\_Carvalho](https://discuss.dev.twitch.com/u/Juan_Carvalho)\
**Post date:** [January 26, 2023, 1:32pm UTC](https://discuss.dev.twitch.com/t/scope-permisison-to-subscritions-api/43056/1 "2023-01-26T13:32:44Z")

</div>

My token have the scopes:

content: b’{“client\_id”:“…”,“scopes”: “channel:read:subscriptions”,“channel\_subscriptions”],“expires\_in”:4916437}\n’

When y call endpoint ‘[https://api.twitch.tv/helix/subscriptions](https://api.twitch.tv/helix/subscriptions)’

# mycode.py

header = {‘Authorization’: ‘Bearer r2nsg1pcge49x…qqwatz7yu5’}  
params = {‘broadcaster\_id’: 149278888}  
requests.get(\_url, headers=header, params=params)

I have the return:  
\_content: b’{“error”:“Unauthorized”,“status”:401,“message”:“Missing scope: channel:read:subscriptions or channel\_subscriptions”}’

The same token is used in oauth2/validate, /user and /videos with success.

Can anyone help me with this?

---

<div class="post-metadata">

**Author:** ![Dist](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://discuss.dev.twitch.com/u/Dist)\
**Post date:** [January 26, 2023, 3:08pm UTC](https://discuss.dev.twitch.com/t/scope-permisison-to-subscritions-api/43056/2 "2023-01-26T15:08:10Z")

</div>

Which OAuth flow did you use? The Client Credentials flow will generate an App access token, where as for any endpoint requiring scopes you need a User Token from going through either the Implicit or Auth Code flows, as only then will there be user interaction to grant those permissions.

/user and /videos doesn’t require user permissions, which would explain why an App token works for those endpoints, but any endpoint requiring a scope would fail.

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [February 25, 2023, 3:08pm UTC](https://discuss.dev.twitch.com/t/scope-permisison-to-subscritions-api/43056/3 "2023-02-25T15:08:31Z")

</div>

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