YouTube Stream Key Not Working: Every Fix Explained
Why your YouTube stream key fails and exactly how to fix it — covering expired keys, wrong server URLs, copy-paste errors, and OBS configuration issues.
Go to YouTube Studio → Go Live → Stream → Stream settings. Click the copy icon next to your stream key (don’t type it manually). Paste into OBS: Settings → Stream → Stream Key. Make sure Service is set to “YouTube – RTMPS” (not the old RTMP). Click OK and try again.
Why Stream Keys Stop Working
| Cause | How Common | Fix |
|---|---|---|
| Key expired or rotated by YouTube | Very Common | Get a new key from YouTube Studio → Go Live → Stream settings |
| Manual copy-paste error (extra space/character) | Very Common | Use the copy icon — never type the key manually |
| Wrong server URL selected in OBS | Common | Set server to “Primary YouTube ingest server” or use Auto |
| Using old RTMP instead of RTMPS | Common | Change OBS service to “YouTube – RTMPS” (secure version) |
| Persistent stream key vs. per-event key mismatch | Common | Use persistent stream key for OBS; per-event keys expire when event ends |
| Account streaming temporarily suspended | Rare | Check YouTube Studio for account notices or strikes |
Step-by-Step: Get a Working Stream Key
Open YouTube Studio and Go to Stream Settings
Navigate to YouTube Studio (studio.youtube.com) → Click “Go Live” in the top right → Select “Stream” tab → Click “Stream settings.”
Copy the Stream Key Using the Copy Button
Click the copy icon (📋) next to the stream key field. Never manually transcribe this — one wrong character causes “failed to connect.” The key is 20+ characters long and easy to copy incorrectly.
Open OBS Settings → Stream
In OBS: File → Settings → Stream. Set Service to “YouTube – RTMPS.” Server should be “Primary YouTube ingest server” or “Auto.” Click in the Stream Key field, select all (Ctrl+A), and paste your key (Ctrl+V).
Click OK and Test the Connection
Click OK to save. Then click “Start Streaming.” Watch the bottom status bar in OBS for the green connection indicator. If it connects, you’ll see bitrate numbers appear. If it shows “Connecting…” for more than 30 seconds, the key is still wrong.
Persistent Key vs. Per-Event Key
YouTube offers two types of stream keys and using the wrong type is a common source of confusion:
- Persistent stream key — stays the same between streams; best for regular OBS streaming; found in Go Live → Stream → Stream settings
- Per-event stream key — generated when you schedule a specific live event; expires when that event ends; if you use this in OBS after the event, it won’t work
- Rule of thumb: For ongoing streaming with OBS, always use the persistent stream key, not event-specific keys
If you created a scheduled live event, the stream key shown in that event’s settings is only valid for that specific event. Once the event ends or is deleted, that key stops working. Go back to the main Stream settings page to find your persistent key.
OBS “Service” Setting Matters
- Use “YouTube – RTMPS” (the secure version) — not the older “YouTube / YouTube HLS” option
- RTMPS encrypts your stream connection; the old RTMP protocol is being phased out by YouTube
- If OBS shows an error about SSL or certificates, try the “YouTube – RTMP” fallback option temporarily
- Server URL format for manual entry:
rtmps://a.rtmps.youtube.com/live2
Stream Without Managing Keys
YTStreamer handles stream key management automatically — connect your YouTube account once and stream any video without touching OBS or stream keys.