YouTube stream key leaked? How to replace it and keep it safe
If your YouTube stream key has leaked, replace it now: in YouTube Studio, open Live Control Room, create a new stream key, switch your encoder to the new key, and delete the leaked one. Anyone who has your old key can send a stream to your channel, so don't wait until you're sure it's been misused. It takes a few minutes, and your stream URL stays the same.
Written by the Yongcast team.
What a stream key is and why a leak matters
YouTube describes stream keys as your stream's "password and address." Your encoder uses the key to know where to send video, and YouTube uses it to decide whether to accept that feed.
That means someone with your key doesn't need to sign in to your account to stream to your channel. In practice:
- A livestream you didn't plan could appear on your channel, with content you don't control.
- If you're not watching your channel, you might not notice right away.
A stream key isn't your Google account password, but it controls who can go live on your channel, so treat it like one. If you're not sure where your key is, start with where to find your YouTube stream key.
How to tell if your key has leaked
Check two things.
1. Has anyone had a chance to see it?
- It appeared on screen in a screenshot, screen recording or screen share.
- You pasted it into a group chat, community, forum, comment or shared document.
- You gave it to a tool, plugin or person you don't fully trust.
- You signed in to a streaming tool on a shared computer, or didn't sign out.
2. Is there any sign it's been used?
- Your channel's livestream list shows a stream or archive you don't recognize.
- Live Control Room shows a preview while your own encoder isn't streaming.
- Viewers comment or message you about a stream you never ran.
If any of these apply, replace the key. You don't need proof that it's been misused.
How to replace your YouTube stream key
- Go to YouTube Studio (studio.youtube.com) and sign in to the channel.
- At the top right, click Create and then Go live to open Live Control Room.
- Open the stream key menu above the preview. It lists your existing keys (such as Default stream key) along with options to create a new stream key and to manage your stream keys.
- Choose Create new stream key, give it a name, leave the protocol set to RTMP (the default), and create it.
- Open the same menu again and select your new key.
- Click the copy button next to it and paste the key into your encoder.
- Open the option to manage your stream keys and delete the one that leaked.
Your stream URL doesn't change. The Stream URL under Stream settings (`rtmp://a.rtmp.youtube.com/live2`) stays the same; only the key changes.
Who can do this: according to YouTube Help, only a channel owner or manager can reset a stream key. Editors and viewers don't have this permission.
After you switch:
- If you're running a 24/7 stream, it will drop briefly while you change keys. Have the new key ready and pick a quiet time.
- Open your channel on another device and check that viewers can see and hear the stream. If your encoder says it's connected but viewers see nothing, see YouTube live stream shows no picture.
How to keep your stream key safe
- Keep it off screenshots. Before recording a tutorial or sharing your screen, close the livestream page or make sure the key is hidden.
- Don't post it anywhere public. Communities, forums, comments, shared documents and group chats are all the wrong place for it. If someone is helping you, paste the key yourself.
- Only give it to tools you trust. Enter it only in streaming software or services whose source you've checked.
- Use separate keys for separate uses. Give each encoder or show its own key, so if one leaks you know which.
- Check regularly. Look at your channel's livestream list now and then for streams you don't recognize, and remove keys you no longer use. After a collaboration ends, someone leaves your team, or your computer goes in for repair, replace the key.
Updating your key in Yongcast
In Yongcast, your stream key is used only to stream your videos to YouTube. Only the last 4 characters are displayed, and the full key is never shown again on the page.
After you create a new key on YouTube, update it in Yongcast:
- Stop any stream that uses this key. You can't change the key while the stream is running.
- Open the Stream keys page in Yongcast and click Edit.
- Paste the new key into the Replacement stream key field and click Save.
- Start the stream again and check the viewer page for picture and sound.
FAQ
My stream key leaked. Can someone sign in to my YouTube account with it?
No. A stream key isn't your Google account password; it lets an encoder send video to your channel. But anyone with it can stream to your channel, so replace it as soon as possible. If you think your account password has leaked too, secure your account separately.
How do I replace a leaked YouTube stream key?
In YouTube Studio, click Create and then Go live to open Live Control Room. Open the stream key menu above the preview, choose Create new stream key, select the new key, copy it into your encoder, then delete the leaked key from your stream key list. Your stream URL stays the same.
Who can reset a YouTube stream key?
According to YouTube Help, only a channel owner or manager. Editors and viewers don't have this permission.
Should I change my stream key regularly?
YouTube Help doesn't set a schedule. Replace it whenever you suspect a leak, after a collaboration ends or when someone leaves your team, and check your channel now and then for streams you don't recognize.