# EventSub Token Authorization error

**URL:** <https://staging-discuss.dev.twitch.com/t/eventsub-token-authorization-error/36701>\
**Category:** API\
**Created:** [February 9, 2022, 10:57am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-token-authorization-error/36701 "2022-02-09T10:57:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdiPol](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AdiPol](https://staging-discuss.dev.twitch.com/u/AdiPol)\
**Post date:** [February 9, 2022, 10:57am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-token-authorization-error/36701/1 "2022-02-09T10:57:53Z")

</div>

Hello, I’m trying to make EventSub when user when the user redeemed the points reward. I have got problem with Token Authorization.

As evidenced by the documentation, I have to set token scope to **channel:read:redemptions** or **channel:manage:redemptions** ([EventSub Subscription Types | Twitch Developers](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelchannel_points_custom_reward_redemptionadd)).

I did as the documentation says, but it has no effect. This is my command:

```bash
curl -d client_id=CLIENT_ID -d client_secret=CLIENT_SECRET -d grant_type=client_credentials -d scope=channel:read:redemptions https://id.twitch.tv/oauth2/token

```

output:

```auto
{"access_token":"MY_TOKEN","expires_in":5248329,"scope":["channel:read:redemptions"],"token_type":"bearer"}

```

But I have got error when I’m trying to add `channel.channel_points_custom_reward_redemption.add` subscription **subscription missing proper authorization** :  
 ![image](https://d2spem0quai2ol.cloudfront.net/original/3X/4/b/4b75b4380db1d0e48b31b2b74a1c01bd62f34110.png)

Everything works fine for me when I set my subscription to e.g. channel.follow, so I don’t know what I’m doing wrong.

---

<div class="post-metadata">

**Author:** ![Dist](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://staging-discuss.dev.twitch.com/u/Dist)\
**Post date:** [February 9, 2022, 11:32am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-token-authorization-error/36701/2 "2022-02-09T11:32:02Z")

</div>

You’re using the wrong Authentication flow. You can’t get user permissions from an App token, as that token doesn’t represent a user, you need to use the [Auth Code Flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-authorization-code-flow) so that the user can grant your app those permissions.

Once the user has connected to your app and explicitly allowed it those permissions, THEN you use an App token from the [Client Credentials flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-client-credentials-flow) to create the EventSub subscription.

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [March 11, 2022, 11:32am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-token-authorization-error/36701/3 "2022-03-11T11:32:33Z")

</div>

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