background
Skip to main content

Stream key

What is a stream key?

A stream key is a private, unique code, usually a long string of letters and numbers, that authorizes your encoder or streaming software to send live video to your channel on a platform like YouTube, Twitch or Facebook. Together with the server URL, it tells your software exactly where to deliver the stream. Treat it like a password: anyone who has it can broadcast to your channel.

You get a stream key from a streaming destination and paste it into your streaming software, such as OBS Studio. Then, when you hit "Go Live," your software knows where to send your stream.

When you want to broadcast live video on a platform like YouTube, Facebook or Twitch, you don’t always need the stream key. Some streaming software, like Restream Studio, can connect to the platform’s API. That means that all you have to do is give the software access to your account on the streaming platform of your choice, and it will connect automatically. 

What does a stream key look like?

A stream key is a random-looking string that the platform generates for you. Most encoders ask for two values that work as a pair:

  • Server URL (also called the stream URL, RTMP URL or ingest server): the address of the platform's ingest server, which usually starts with rtmp:// or rtmps://. It's often the same for everyone on a platform or region.
  • Stream key: the private part that identifies your channel or stream. An illustrative (not real) example: live_123456789_aBcDeFgHiJkLmNoPqRsT.

Your encoder needs both. The server URL says where to send the video, and the stream key says which channel it belongs to. Many encoders, including OBS Studio, fill in the server URL automatically when you choose a platform from the list, so you only paste the key.

Why do you need a stream key?

You need a stream key to let your streaming software know where to send your live video. Most streaming platforms — like Twitch, YouTube, Facebook, LinkedIn, X (Twitter), Instagram, etc. — generate stream keys for when you want to go live. With a stream key, you ensure that your live video appears on your channel, profile or account with the platform you’ve chosen.

Keep your stream key secure

Your stream key is private. Treat it like a password and don't share it with anyone you don't want streaming on your channel. If someone gets hold of it, they can start a live stream on your channel whenever they want.

  • Never show it on screen. Hide your encoder's stream settings before you start a stream or record a tutorial.
  • Reset it if it leaks. Generate a new key in your platform's stream settings and paste it into your encoder. The old key stops working. See how to reset your Twitch stream key or YouTube stream key.
  • Know whether your key is reusable. Some keys stay the same until you reset them, while others are tied to a single stream or source. For example, Twitch keeps your key until you reset it or change your password, while YouTube lets you create several keys and pick one per stream.
  • Use a direct connection when you can. Tools that connect to the platform through your account, such as Restream Studio, don't need you to copy a key at all.

Does the stream key change?

On most streaming platforms, the stream key does not change unless you generate a new one. If you change the password to your account on the streaming website, it might automatically create a new stream key for you for security reasons. Each time you go live, you shouldn’t need a new stream key, unless it has been reset.

If you need to change your stream key, you can usually do so by going into the settings of your streaming platform. Once you generate a new stream key, you’ll have to copy and paste it into your streaming software again.

Where to find a stream key 

You can find the stream key for a streaming platform in your account settings, although it changes slightly for each platform. Read our guides on how to find your stream key on all major streaming platforms:

Once you’ve found your stream key on your streaming platform of choice, you’ll have to copy and paste it into your streaming software, such as OBS Studio or Restream Studio.

How to use a stream key

Once you’ve found your stream key on your streaming destination (Twitch, YouTube, etc.), you have to paste it into your streaming software to get your live video to broadcast correctly. If you’re using Restream Studio as your streaming software, you can easily add it with the following steps:

  1. After finding and copying your stream key on your destination platform, log in to your Restream account. 
  2. Select Edit/Add Channel and select the icon for the channel you want to stream to. Note: Restream works with over 30 live streaming destinations, and you can multistream to several channels at once. But you have to add them to your Restream account one at a time.
  3. Paste your stream key and your channel URL (also called a server URL) into the appropriate fields. You can usually find your channel URL in the same spot that you find your stream key.
  4. Select Add Channel.
  5. Select Stream with Studio. Enter your name and give Restream access to your mic and camera. Select Enter Studio.
  6. Make sure the channel you want to stream to is toggled on and when you’re ready to start broadcasting, select the red Go Live button.

Pro tip: Restream doesn’t always require a stream key when you want to go live. For some channels, like Twitch and Facebook, you can just sign into your account and give Restream access. Then, your live videos will show up on your channel or profile. There’s no need to track down your stream key and paste it into Restream!

If you use OBS Studio, you can send one stream to Restream and multistream to several channels at once. Restream.io is built into the list of services in OBS's stream settings, so you can connect OBS to Restream by logging in or with your Restream stream key:

  1. In Restream, select Connect to OBS, Zoom….
  2. You’ll see your RTMP URL and stream key displayed. Copy your stream key.
  3. Open OBS Studio and go to Settings.
  4. Select Stream from the left-hand menu.
  5. Select Restream.io from the pull-down menu at the top.
  6. Paste in your stream key. You may have to do the same for your RTMP URL.

For more help, read our full guide to finding your stream key in OBS.

Stream key FAQ

How do I get my stream key?

To get your stream key, you’ll have to go to the settings on your live streaming platform. For some platforms, like YouTube, you have to create a new live video to get a stream key. Once you have the stream key, you can paste it into your streaming software.

What happens if someone sees my stream key?

If someone else sees your stream key and they’re not supposed to, they can copy it and use it to broadcast live videos on your channel. If you suspect that your stream key may no longer be private, you should generate a new one — and try not to let anyone else see it!

Why can't I find my stream key?

In most cases, you’ll find your stream key in the account settings on your streaming platform of choice. Some platforms, like YouTube, may generate a stream key once you set up a new broadcast.

Is a stream key the same as a server URL?

No. The server URL is the address of the platform's ingest server, and the stream key identifies your channel or stream. Your encoder needs both, but only the stream key is private.

Do I need a stream key to multistream?

Not always. With Restream, you can connect most platforms by logging in to your accounts, so you don't have to copy each platform's stream key. If you use an encoder like OBS, you only enter one Restream stream key (or log in), and Restream sends your stream to all your connected channels.