Overview

VMSC connects to YouTube using the YouTube Data API v3, authenticated through OAuth with VMSC's own registered Google Cloud application. This integration provides real-time access to live chat messages, Super Chats, memberships, and other stream events while your YouTube live stream is active.

Live Chat messages are received through polling at a rapid interval, delivering near-real-time message processing. Monetary events like Super Chats and membership gifts are captured as they occur during the stream.

Prerequisites

  • A YouTube account (the channel you stream from)
  • An active YouTube live stream — chat events are only available while you are broadcasting
  • VMSC installed and running on your machine

No Google Cloud Console access, API keys, or developer credentials are required. VMSC handles all API authentication internally.

Live Stream Required

YouTube chat events only work while you are actively live streaming. Unlike Twitch, YouTube does not provide event notifications when you are offline. VMSC will show a "Waiting for stream" state until a live broadcast is detected.

Step-by-Step Connection

  1. Open VMSC and navigate to the Sources panel from the sidebar
  2. Locate the YouTube source card and click it to expand the settings
  3. Click the "Login with YouTube" button
  4. A browser window opens with the Google OAuth consent screen
  5. Select the Google account associated with your YouTube channel
  6. Review the permissions requested and click "Allow"
  7. The browser redirects back and VMSC confirms the connection
  8. The YouTube status card on the dashboard updates to show your channel name and connection state

VMSC requests only the minimum permissions needed: read access to your live chat and live broadcast information. It does not request permission to post messages, modify your channel, or access private videos.

Auto-Connect on Launch

After your initial login, VMSC stores your OAuth tokens securely and refreshes them automatically on each launch. The YouTube connection re-establishes itself without any user interaction.

If the token refresh fails (for example, if you revoke VMSC's access from your Google Account settings), you will be prompted to log in again.

Supported Events

VMSC captures the following YouTube live stream events:

Event Description Key Data
Chat Message A viewer sends a message in live chat Username, message text, profile image, badges
Super Chat A viewer sends a paid Super Chat message Username, amount, currency, message, color tier
Super Sticker A viewer sends a Super Sticker Username, amount, currency, sticker ID
Membership Gift A viewer gifts channel memberships to others Gifter username, gift count, tier
Member Milestone A member reaches a membership milestone Username, milestone months, message
New Subscriber A viewer subscribes to your channel Username, timestamp
User Banned A user is banned or timed out from live chat Username, moderator, ban type (permanent/temporary), duration

Live Chat Polling

YouTube does not offer a real-time push-based API for live chat (unlike Twitch EventSub). Instead, VMSC polls the YouTube Data API at a rapid interval to fetch new chat messages and events.

The polling interval is determined dynamically based on the API response. YouTube returns a recommended polling interval with each request, and VMSC respects this to stay within API quota limits while delivering messages as quickly as possible.

API Quota

The YouTube Data API enforces a daily quota. VMSC's polling is designed to stay well within the default quota allocation. Under normal usage, you will not hit quota limits. If you use other applications that consume YouTube API quota on the same Google Cloud project, you may need to monitor your usage.

Dashboard Status Card

The YouTube connection is displayed as a status card on the VMSC dashboard with the following states:

Status Indicator Meaning
Disconnected Gray Not connected to YouTube. Click "Login with YouTube" to connect.
Waiting for stream Yellow Connected to YouTube, but no active live broadcast detected.
Live Green (pulsing) Your stream is live and VMSC is polling chat and capturing events.
Error Red Connection or API error. Check the error message for details.

The status card also shows your YouTube channel name, profile image, and the current broadcast title when live.

Troubleshooting

OAuth Login Fails

  • Ensure you are selecting the correct Google account that owns your YouTube channel
  • If the consent screen shows a warning about an unverified app, click "Advanced" and then "Go to VMSC" to proceed
  • Clear your browser cookies for accounts.google.com if you experience redirect loops

Connected But No Events

  • Confirm that your YouTube live stream is actually active and that chat is enabled
  • Check that the status card shows "Live" rather than "Waiting for stream"
  • Send a test message in your own chat to verify message polling is working

Quota Exceeded Errors

  • YouTube API quota resets daily at midnight Pacific Time
  • If you receive quota errors, reduce the number of other applications using YouTube API on the same account
  • VMSC will automatically retry when quota becomes available

Next Steps

With YouTube connected, you can build rules that respond to live stream events: