Skip to content

YouTube API Setup

ekudram edited this page Sep 23, 2026 · 1 revision

YouTube Data API Setup (RICS)

This is the Google Cloud half of YouTube. When the key works, go back to YouTube Settings and click Connect (Read-Only).

RICS reads YouTube Live chat with a YouTube Data API v3 API key plus your Channel ID. Sending replies (OAuth) is not in the current YouTube tab — read-only is what this guide covers.

You need:

  • A Google account (the one that owns the Cloud project)
  • Your YouTube channel (the one you stream with)
  • An active live stream with chat enabled when you connect in RimWorld

Each streamer creates their own Google Cloud project and API key. Do not share keys on stream, Discord, or GitHub.


1. Open Google Cloud Console

  1. Go to https://console.cloud.google.com/
  2. Sign in with a Google account you control.

You can also click Get Key on the RICS YouTube tab — it opens the console and shows a short in-game checklist.


2. Create a project

  1. At the top of the console, open the project picker.
  2. Click New Project.
  3. Name it something you will recognize, for example RICS YouTube.
  4. Leave organization blank if you are not using Google Workspace.
  5. Click Create, then select that project in the picker.

One project per streamer is enough. Do not reuse a key from someone else’s screenshot.


3. Enable YouTube Data API v3

  1. Open APIs & Services → Library.
  2. Search for YouTube Data API v3.
  3. Open it and click Enable.

If this step is skipped, RICS will fail API-key validation (often a 403).


4. Create an API key

  1. Open APIs & Services → Credentials.
  2. Click + Create credentials → API key.
  3. Copy the key. Treat it like a password.
  4. Click Edit API key (or the key name) and lock it down:
Setting Recommendation
Name RICS RimWorld
Application restrictions None (RimWorld is a desktop app, not a website — HTTP referrer / Android / iOS restrictions will break it)
API restrictions Restrict key → check YouTube Data API v3 only

Save.

Never restrict the key to HTTP referrers. That is for websites. RICS calls Google from the game process.


5. Find your Channel ID

RICS needs the ID that starts with UC (24 characters), not @handle and not the display name.

Ways to get it:

  1. RICS YouTube tab → Find ID (opens Comment Picker).
  2. YouTube Studio → Settings → Channel → Advanced settings → Channel ID.
  3. Open your channel in a browser. If the URL is youtube.com/channel/UC…, that UC… value is the ID.

Paste the UC… ID into RICS Channel ID. Using a handle or display name can force extra search.list calls (those have a separate 100-per-day cap). Always prefer the UC ID.


6. Paste into RICS

  1. RimWorld → Options → Mod Settings → RICS → YouTube tab.
  2. Check Enable YouTube Integration.
  3. Paste Channel ID.
  4. Click Paste next to API Key (copy the key to the clipboard first). The field stays masked.
  5. You should see API Key configured.
  6. Go live on YouTube with live chat on.
  7. Click Connect (Read-Only).

Status should turn Connected. Mode stays Read-Only unless OAuth send is set up (not on this tab today).

You must be live. There is no chat ID to poll on a VOD or an offline channel.


7. Test

From YouTube live chat, send !bal (or !help).

RICS should process the command. Replies appear in RimWorld / other platforms you have connected. They will not appear as YouTube chat messages until send/OAuth is available.


Security

  • Do not show the full API key on stream. The RICS field is masked; the Cloud Console is not.
  • If the key leaks: Cloud Console → Credentials → Regenerate key (or delete and create a new one) → Paste again in RICS.
  • Restrict the key to YouTube Data API v3 as above.
  • Do not commit keys to git or this wiki.

Troubleshooting

Cannot Connect is gray
Fill Channel ID and API Key first.

API key validation failed / 403
YouTube Data API v3 is not enabled, the key is wrong, or API restrictions block it. Enable the API, wait a minute, try again.

No active live stream
Start the stream, wait until YouTube shows you as live, then Connect. Chat must be enabled on the broadcast.

Channel not found
Use the UC… Channel ID, not @name.

quotaExceeded / chat stops mid-stream
Default project quota is 10,000 units/day (resets midnight Pacific). See YouTube API Quota.

Key works in Console but not in RICS
Application restriction is probably HTTP referrers or an IP that is not yours. Set Application restrictions to None.


Related

Clone this wiki locally