# Authorised application unable to send to channel because of missing scopes

**URL:** <https://discuss.dev.twitch.com/t/authorised-application-unable-to-send-to-channel-because-of-missing-scopes/59460>\
**Category:** API\
**Created:** [June 21, 2024, 1:33pm UTC](https://discuss.dev.twitch.com/t/authorised-application-unable-to-send-to-channel-because-of-missing-scopes/59460 "2024-06-21T13:33:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![the-trev](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/the-trev/32/14587_2.png) [@the-trev](https://discuss.dev.twitch.com/u/the-trev)\
**Post date:** [June 21, 2024, 1:33pm UTC](https://discuss.dev.twitch.com/t/authorised-application-unable-to-send-to-channel-because-of-missing-scopes/59460/1 "2024-06-21T13:33:45Z")

</div>

I have a verified application/chatbot that I want to use to send a chat message to a channel. Currently we have an IRC chatbot performing operations, but we want to move across to eventsub/webhooks as a means of stability more than anything. We have subscriptions set up for streaming status updates, and subsequently webhooks to respond properly.

The user has authorised the application with the correct scopes (user:read:chat, user:write:chat, user:bot and channel:bot just to cover all bases) using authorization code grant flow. I then wish to use the Send Chat Message endpoint using the application access token so as to appear that the message is being sent from the application itself.

- Authorization header is Bearer [app access token]
- Sender ID is the user ID for the application
- Broadcaster ID is the channel to send the messages to

Each time we try to send the message, we get the error

```auto
"The sender must have authorized the app with the user:write:chat and user:bot scopes."

```

It was mentioned [elsewhere](https://discuss.dev.twitch.com/t/app-access-token-with-scopes/58286/4) but it’s still not clear to me how this application is missing scopes when the user’s fully authed up. Validating the user access token confirms the right scopes are in place, so unless I misunderstand, I am able to use the _application_ access token on this endpoint.

The API is being handled as server-to-server, and we’re going to be creating conduits / eventsubs for incoming message reading. I figure either I’m misreading how this endpoint is actioned (incorrect sender ID maybe?), or I need the subscription [channel.chat.message](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types/#channelchatmessage) to be enabled _as well as the correct scopes_ in order for the endpoint to work? In which case the error I’m receiving doesn’t pinpoint the underlying issue. Anywho, any help appreciated!

---

<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:** [June 21, 2024, 1:34pm UTC](https://discuss.dev.twitch.com/t/authorised-application-unable-to-send-to-channel-because-of-missing-scopes/59460/2 "2024-06-21T13:34:54Z")

</div>

> [@the-trev](#):
>
> Each time we try to send the message, we get the error
> 
> ```auto
> "The sender must have authorized the app with the user:write:chat and user:bot scopes."
> 
> ```

The user you are trying to send chat as the `sender ID` in your call.

You didn’t prior generate a user access token for `sender ID` with the stated scopes.

> [@the-trev](#):
>
> I then wish to use the Send Chat Message endpoint using the application access token so as to appear that the message is being sent from the application itself.

You can’t send messages as “an application”  
Messages are sent as an actual user, so you need to authroizer the user in `senderID` to your clientID first

---

<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:** [July 21, 2024, 1:35pm UTC](https://discuss.dev.twitch.com/t/authorised-application-unable-to-send-to-channel-because-of-missing-scopes/59460/3 "2024-07-21T13:35:34Z")

</div>

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