Overview
VMSC integrates with YouTube through the YouTube Data API v3, specifically the Live Chat Messages and Live Broadcasts endpoints. After authorizing your Google account, VMSC detects your active live broadcast and begins polling the live chat for events.
All YouTube events are normalized into the VMSC StreamEvent format with source set to "youtube".
Live Chat Polling Mechanism
Unlike Twitch's EventSub (which pushes events over WebSocket), YouTube uses a polling model. VMSC polls the liveChatMessages.list endpoint at regular intervals.
| Setting |
Value |
| API Endpoint |
youtube.googleapis.com/youtube/v3/liveChat/messages |
| Poll Interval |
Determined by YouTube's pollingIntervalMillis response header (typically 5–10 seconds) |
| Auth |
Google OAuth 2.0 with youtube.readonly scope |
| Rate Limits |
YouTube API quota: 10,000 units/day by default. Each poll costs ~5 units. |
⚠️
API quota limits
YouTube's daily quota can be consumed quickly during long streams. VMSC respects the pollingIntervalMillis value returned by YouTube to minimize quota usage. If you run out of quota, chat events stop until the quota resets at midnight Pacific time.
YouTube Events
The following events are extracted from YouTube Live Chat messages based on their snippet.type field.
| YouTube Message Type |
VMSC Event Type |
Description |
textMessageEvent |
chat |
A viewer sends a regular chat message. |
superChatEvent |
superchat |
A viewer sends a paid Super Chat message. |
superStickerEvent |
supersticker |
A viewer sends a paid Super Sticker. |
membershipGiftingEvent |
membership_gift |
A viewer gifts channel memberships to other viewers. |
memberMilestoneChatEvent |
member_milestone |
A member reaches a membership milestone (e.g., 6 months). |
newSponsorEvent |
new_subscriber |
A viewer becomes a new channel member. |
messageDeletedEvent / userBannedEvent |
user_banned |
A user is banned or timed out from the live chat. |
Per-Event Data Fields
chat (textMessageEvent)
| Field | Type | Description |
message | string | Full text of the chat message. |
isChatOwner | boolean | Whether the message author is the channel owner. |
isChatModerator | boolean | Whether the message author is a moderator. |
isChatSponsor | boolean | Whether the message author is a channel member. |
superchat (superChatEvent)
| Field | Type | Description |
amount | number | Monetary amount in micros (divide by 1,000,000 for the display value). |
currency | string | ISO 4217 currency code (e.g., "USD"). |
displayAmount | string | Formatted amount string (e.g., "$5.00"). |
message | string | Text accompanying the Super Chat. |
tier | number | Super Chat color tier (1–7). |
supersticker (superStickerEvent)
| Field | Type | Description |
amount | number | Monetary amount in micros. |
currency | string | ISO 4217 currency code. |
displayAmount | string | Formatted amount string. |
stickerId | string | ID of the Super Sticker image. |
stickerDisplayUrl | string | URL to the sticker image. |
membership_gift (membershipGiftingEvent)
| Field | Type | Description |
giftCount | number | Number of memberships gifted. |
membershipLevel | string | Name of the membership tier gifted. |
member_milestone (memberMilestoneChatEvent)
| Field | Type | Description |
memberMonth | number | Total months as a member. |
membershipLevel | string | Name of the membership tier. |
message | string | Milestone message (if any). |
new_subscriber (newSponsorEvent)
| Field | Type | Description |
membershipLevel | string | Name of the membership tier joined. |
isUpgrade | boolean | Whether this is an upgrade from a lower tier. |
user_banned (userBannedEvent)
| Field | Type | Description |
banType | string | "permanent" or "temporary". |
banDurationSeconds | number | Duration for temporary bans (0 for permanent). |