Sources and statuses
Events come from four sources. Donatty donations are available without connecting a source. Connect Donation Alerts, Twitch and YouTube separately. For requirements and delivery timing, see source conditions.
| Source | What arrives | How to recognize it | Conditions |
|---|---|---|---|
| Donatty | donations through your donation page, goals | a donation with source set to DONATTY: Donation; goals: Goal |
Donatty |
| Donation Alerts | Donation Alerts donations | a donation with source set to DONATION_ALERTS: Donation |
Donation Alerts |
| Twitch | follows, subscriptions and gift subscriptions, bits, raids, channel point rewards, hype train levels | twitch.* events: Twitch event formats |
Twitch |
| YouTube | new subscribers, channel members, Super Chats and Super Stickers | youtube.* events: YouTube event formats |
YouTube |
Donation Alerts
Section titled “Donation Alerts”Donation Alerts donations arrive in the donations channel as the same donation.created event as Donatty donations, and in responses from the Donations method. Their source is DONATION_ALERTS. For fields that are empty in these donations, see the Donation structure. To check the Donation Alerts connection, find the source with platform set to DONATION_ALERTS in the source status.
For delivery requirements and possible gaps, see the Donation Alerts conditions.
Twitch
Section titled “Twitch”Twitch events arrive in the twitch channel as twitch.* events and in responses from Platform events: they are the same PlatformEvent objects. The fields of each type are in Twitch event formats, the key scope is twitch:read (key scopes).
For connection requirements, when collection starts and event delays, see the Twitch conditions. Step by step: the Connect Twitch quick start.
YouTube
Section titled “YouTube”YouTube events arrive in the youtube channel as youtube.* events and in responses from Platform events: they are the same PlatformEvent objects. The amount of a Super Chat and a Super Sticker is ExactMoney in the viewer’s currency. The fields of each type are in YouTube event formats, the key scope is youtube:read (key scopes).
For connection requirements, the first poll, event delays and exhausted quotas, see the YouTube conditions. Step by step: the Connect YouTube quick start.
Source status
Section titled “Source status”The Event sources method shows whether Donatty is currently receiving events from your accounts: Donation Alerts with the donations:read scope, Twitch with twitch:read, YouTube channels with youtube:read. The request and the response are on the method page.
When the status or the unavailableTypes list changes, a source.status_changed event arrives with the same object: in the donations channel for Donation Alerts, in the twitch channel for Twitch and in the youtube channel for YouTube. All fields are in the SourceStatus structure.
| Status | What it means | What to show the streamer |
|---|---|---|
IDLE |
no connections are requesting events from this account | open a connection with the right channel |
STARTING |
Donatty is connecting to the platform or waiting for Twitch to confirm the subscriptions; for YouTube, the first poll hasn’t finished | “connecting” |
READY |
the platform confirmed the connection; for YouTube, polling is running and progressing for every available type, with no fixed delay. Types from unavailableTypes still don’t arrive, and an event arrives only when it happens on the platform |
nothing: everything works |
CAPACITY_LIMITED |
Donation Alerts only: Donatty waits for a free slot for the connection | “Donation Alerts donations may not arrive” |
QUOTA_LIMITED |
YouTube only: Donatty’s daily YouTube quota is used up; for when polling resumes, see the YouTube conditions | “YouTube events will arrive later or may not arrive” |
REAUTH_REQUIRED |
access to the account was revoked | “link the account in your dashboard again” |
ERROR |
the platform rejected access for another reason, or polling is disabled or has stalled | “the platform’s events don’t arrive” |
Treat an unknown status as not ready.
Gaps: gapSince and unavailableTypes
Section titled “Gaps: gapSince and unavailableTypes”gapSincemarks when a possible gap began.gapSince: nulldoes not guarantee that no events were missed. To catch up, see How to read the gap and the Stream and catch-up example.unavailableTypeslists the Twitch and YouTube event types that don’t arrive now for a known reason. An empty list doesn’t mean everything is ready: look atstatustoo. For why a type may be unavailable, see the source conditions.
The API server stores the current status in memory and keeps no separate history of status changes. After an API server restart, since is the time that server first observes the source.