# Have a promblem with create subscription to an event

**URL:** <https://discuss.dev.twitch.com/t/have-a-promblem-with-create-subscription-to-an-event/57846>\
**Category:** API\
**Created:** [April 7, 2024, 11:58am UTC](https://discuss.dev.twitch.com/t/have-a-promblem-with-create-subscription-to-an-event/57846 "2024-04-07T11:58:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lonedeadly](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@lonedeadly](https://discuss.dev.twitch.com/u/lonedeadly)\
**Post date:** [April 7, 2024, 11:58am UTC](https://discuss.dev.twitch.com/t/have-a-promblem-with-create-subscription-to-an-event/57846/1 "2024-04-07T11:58:42Z")

</div>

### I use a translator.

### Good afternoon. I can’t figure out what I’m doing wrong.

I want to create a subscription to an event ([https://api.twitch.tv/helix/eventsub/subscriptions](https://api.twitch.tv/helix/eventsub/subscriptions)).

Specifically, using channel.chat.message as an example.

I have registered my application. I got the secret key.

Then I generated an address with “all” access areas and sent it to the broadcaster.

I got permission and saved the access key.

Then when I try to create a subscription by specifying in the “Authorization” field the received access key and in the “Client-ID” field the identifier of my application, I get the following response

“auth must use app access token to create webhook subscription”

I saw one thread in the forum about this problem, but I still don’t understand what’s wrong.

Can someone please give me in order, point by point, links to the right methods that need to be executed in a certain order?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [April 7, 2024, 12:01pm UTC](https://discuss.dev.twitch.com/t/have-a-promblem-with-create-subscription-to-an-event/57846/2 "2024-04-07T12:01:47Z")

</div>

> [@lonedeadly](#):
>
> Then when I try to create a subscription by specifying in the “Authorization” field the received access key and in the “Client-ID” field the identifier of my application, I get the following response
> 
> “auth must use app access token to create webhook subscription”

For webhooks/conduits you must use an `app access token` also called a `client credentials` token

Here you have tried to use the users access token.

For webhooks/conduits you do:

- Generate/obtain a user access token with the relevant permissions for the user ID’s in the condition(s) for the topic you want

- Store or discard the resultant access token, you only need ti for API (no EventSub Webhook calls)

- Generate an app access/client credentails token

- Create Subscriptions

The frist step of generating a user access token creates a permission link between your ClientID and the Users

Blog Post I wrote: [How does Twitch’s new EventSub work? – Barry Carlyon](https://barrycarlyon.co.uk/wordpress/2021/02/03/how-does-twitchs-new-eventsub-work/)  
Notes I wrote about chat.message auth: [twitch\_misc/eventsub/websockets/web/chat at main · BarryCarlyon/twitch\_misc · GitHub](https://github.com/BarryCarlyon/twitch_misc/tree/main/eventsub/websockets/web/chat#how-does-authentication-work)

So for chat topics as a Webhook

- Get a user token from the user you want to read chat as (with scopes)
- Get a user token from the user you want to read the chat of (with scopes)
- Ignore both tokens
- Generate a Client Credentials/App Access token (with no scopes)
- Create Subscriptions

---

<div class="post-metadata">

**Author:** ![lonedeadly](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@lonedeadly](https://discuss.dev.twitch.com/u/lonedeadly)\
**Post date:** [April 7, 2024, 12:06pm UTC](https://discuss.dev.twitch.com/t/have-a-promblem-with-create-subscription-to-an-event/57846/3 "2024-04-07T12:06:13Z")

</div>

you mean this?

> **[Getting OAuth Access Tokens](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#client-credentials-grant-flow)**
>
> Getting OAuth Access Tokens

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [April 7, 2024, 12:07pm UTC](https://discuss.dev.twitch.com/t/have-a-promblem-with-create-subscription-to-an-event/57846/4 "2024-04-07T12:07:02Z")

</div>

Yes. That is the link to the documentation for app access aka client credential tokens

---

<div class="post-metadata">

**Author:** ![lonedeadly](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@lonedeadly](https://discuss.dev.twitch.com/u/lonedeadly)\
**Post date:** [April 7, 2024, 12:26pm UTC](https://discuss.dev.twitch.com/t/have-a-promblem-with-create-subscription-to-an-event/57846/5 "2024-04-07T12:26:07Z")

</div>

Thank you so much!!! I haven’t seen my mistake all day. But it’s probably a translation problem

---

<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:** [May 7, 2024, 12:27pm UTC](https://discuss.dev.twitch.com/t/have-a-promblem-with-create-subscription-to-an-event/57846/6 "2024-05-07T12:27:01Z")

</div>

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