# Twitch

Connect Twitch, see which permissions PX Studio asks for, which events trigger alerts, what needs Affiliate or Partner and how to fix connection problems.

PX Studio connects to your Twitch channel with your permission. Twitch then sends your follows, subs, Bits, raids and more to PX Studio the moment they happen, and PXStudioBot can join your chat.

## Connect your channel

::: steps
Open **Settings** → **Connections** and click **Connect** on the Twitch card.

Twitch shows which permissions PX Studio asks for. Click **Authorize**. You come back to PX Studio and the card shows **Connected as** your channel name.

Check the **Stream check** on the home page. Twitch should show as verified.
:::

Twitch grants the permissions as one package; you cannot leave single ones out. When PX Studio adds a feature that needs a new permission, the card shows **Reconnect needed**. Click **Reconnect** once and approve again. Your settings stay as they are.

**Disconnect** stops alerts and live stats for this channel until you reconnect. Your login stays linked.

## Permissions PX Studio asks for

A permission alone does not bring every event: subs, Bits, Channel Points and Hype Trains exist only on Affiliate and Partner channels, see [Affiliate and Partner features](/docs/twitch#affiliate-and-partner-features).

| Permission (Twitch scope) | Used for |
| --- | --- |
| `moderator:read:followers` | Follow alerts and follower counts |
| `channel:read:subscriptions` | Sub, resub and gift sub alerts and sub counts |
| `bits:read` | Bits (cheer) alerts |
| `channel:read:goals` | Read access to your Twitch creator goals |
| `channel:read:redemptions`, `channel:manage:redemptions` | Channel Point redemptions in the activity feed and overlay actions, marking them as done |
| `channel:read:hype_train` | Hype Train events in the activity feed |
| `channel:manage:broadcast` | Changing your stream title and category from PX Studio |
| `user:write:chat` | Sending chat messages from the PX Studio chat panel |
| `moderator:manage:chat_messages`, `moderator:manage:banned_users`, `moderator:manage:chat_settings` | Deleting messages, timeouts and bans, chat modes such as slow mode |
| `user:read:moderated_channels` | Showing mod tools in channels you moderate |
| `channel:bot` | Letting PXStudioBot read and write in your chat |

PX Studio never asks for your Twitch password and never sees it.

## What triggers alerts

| Twitch event | In PX Studio | Needs |
| --- | --- | --- |
| Follow | Alertbox **Show follows**, follower goals | Any channel |
| New sub | **Show new subs**, sub goals | Affiliate or Partner |
| Resub with message | **Show resubs** | Affiliate or Partner |
| Gift subs | **Show gift subs** | Affiliate or Partner |
| Bits (cheer) | **Show Bits and Kicks**, Bits goals | Affiliate or Partner |
| Raid | **Show raids** (raider name and viewer count) | Any channel |
| Channel Point redemption | Activity feed, Event List, overlay actions in the bot panel tab **Channel Points** | Affiliate or Partner |
| Hype Train | Activity feed (filter **Hype**) and stream reports | Affiliate or Partner |
| Stream online and offline | Stream sessions and stats | Any channel |

Turn each alert type on or off in the Alertbox under **Events**; see [Alerts](/docs/alerts). Hype Trains and redemptions do not pop up in the Alertbox.

## Affiliate and Partner features

Subs, Bits, Channel Points and Hype Trains exist only on monetized Twitch channels, that is Affiliates and Partners. Cheering is turned on by default for them; its settings live in the Twitch **Creator Dashboard** under **Settings** → **Monetization**. Your progress towards Affiliate is shown under **Achievements** in the Creator Dashboard. Follow and raid alerts work for every channel.

A channel can have at most 50 custom Channel Point rewards, enabled and disabled together.

## Raids

You start a raid in your Twitch chat with `/raid channelname`; `/unraid` cancels it. When another streamer raids you, Twitch tells PX Studio who raided and with how many viewers, and the Alertbox shows it with **Show raids**. Raid alerts need no extra permission.

## PXStudioBot on Twitch

PXStudioBot is its own Twitch account. With the `channel:bot` permission from your connection it can read and write in your chat. Make it a moderator so it can also remove spam and time out users: type `/mod PXStudioBot` in your Twitch chat. The bot panel **Overview** copies the command for you. Details in [PXStudioBot](/docs/pixbot).

## Limits

- **Chat messages per bot**: Twitch allows a bot 20 messages per 30 seconds. As broadcaster, moderator or VIP the limit is 100 messages per 30 seconds. Without one of these roles, a bot may also send only one message per second in a channel. If a bot goes over the limit, Twitch ignores its messages for one hour, except in chats where it is broadcaster, moderator or VIP. That is why PXStudioBot should be a moderator.
- **Message length**: chat messages are limited to 500 characters.
- **Timeouts**: from 1 second up to 2 weeks.
- **Revoked access**: Twitch ends PX Studio's event subscriptions when you change your Twitch password or disconnect PX Studio on Twitch. Alerts stop until you reconnect.

## Connection problems

- **Reconnect needed** on the Twitch card or **Reconnect Twitch** in the Stream check: a permission is missing or the sign-in is no longer valid. Click **Reconnect** under **Settings** → **Connections** and approve.
- **Alerts stopped after a password change**: Twitch invalidates app access when you change your password. Reconnect.
- **You removed PX Studio on Twitch**: under your Twitch settings, **Connections** → **Other Connections**, a **Disconnect** cuts PX Studio off. Connect again in PX Studio.
- **"Missing bot permission - reconnect your account"** in the bot panel: reconnect Twitch so the `channel:bot` permission is granted.
- **"PXStudioBot is not in your chat yet"**: join it from the **Overview** tab of the bot panel.
- **The bot cannot delete messages or time out users**: it is not a moderator yet. Type `/mod PXStudioBot` in your chat.
- **No sub, Bits or Channel Point alerts**: your channel is not Affiliate or Partner yet, or the event is turned off in the Alertbox. Use **Test alert** to check the Alertbox itself.

More fixes are in [Troubleshooting](/docs/troubleshooting). Streaming on Kick as well? See [Kick](/docs/kick).

## Sources

- [dev.twitch.tv/docs/eventsub/eventsub-subscription-types](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types/)
- [dev.twitch.tv/docs/eventsub/manage-subscriptions](https://dev.twitch.tv/docs/eventsub/manage-subscriptions/)
- [dev.twitch.tv/docs/authentication/scopes](https://dev.twitch.tv/docs/authentication/scopes/)
- [dev.twitch.tv/docs/authentication/refresh-tokens](https://dev.twitch.tv/docs/authentication/refresh-tokens/)
- [dev.twitch.tv/docs/authentication/validate-tokens](https://dev.twitch.tv/docs/authentication/validate-tokens/)
- [dev.twitch.tv/docs/chat](https://dev.twitch.tv/docs/chat/)
- [dev.twitch.tv/docs/api/reference](https://dev.twitch.tv/docs/api/reference/)
- [help.twitch.tv/s/article/streamer-benefits](https://help.twitch.tv/s/article/streamer-benefits?language=en_US)
- [help.twitch.tv/s/article/joining-the-affiliate-program](https://help.twitch.tv/s/article/joining-the-affiliate-program?language=en_US)
- [help.twitch.tv/s/article/cheering-for-partners-affiliates](https://help.twitch.tv/s/article/cheering-for-partners-affiliates?language=en_US)
- [help.twitch.tv/s/article/channel-points-guide](https://help.twitch.tv/s/article/channel-points-guide?language=en_US)
- [help.twitch.tv/s/article/hype-train-guide](https://help.twitch.tv/s/article/hype-train-guide?language=en_US)
- [help.twitch.tv/s/article/chat-commands](https://help.twitch.tv/s/article/chat-commands?language=en_US)
- [help.twitch.tv/s/article/twitch-account-settings](https://help.twitch.tv/s/article/twitch-account-settings?language=en_US)
