How to find your Stream Key and RTMP/RTMPS URL to go live on X (Twitter) with a business account

To stream live on X (formerly Twitter) using an encoder (e.g., OBS Studio, vMix, Wirecast, Streamlabs), you typically create an RTMP Source inside Media Studio Producer and then copy two values: the RTMP/RTMPS URL and the Stream Key.

Security
Your Stream Key is like a password: anyone who has it can stream on your account. Don’t share it or show it in public screenshots.
“Business page” note
X doesn’t have Pages like Facebook — the equivalent is a brand/business account. This guide applies to any account that has access to Media Studio Producer.

1) Requirements and what you need

  • Access to X Media Studio Producer (not all accounts will see it).
  • Depending on current policy, it may require a verified account with X Premium/Premium+.
  • An encoder (e.g., OBS Studio) and stable upload bandwidth.
Needed details
RTMP/RTMPS URL (Server):  rtmp(s)://HOST[:PORT]/PATH
Stream Key:               LONG_KEY_GENERATED_BY_X

In OBS: Server = RTMP/RTMPS URL • Stream Key = Stream Key.

2) Open X Media Studio / Producer

  1. Log in to X with your business/brand account.
  2. Open Media Studio:
    • Typical URL: studio.x.com
    • In some experiences it may still appear as “studio.twitter.com” or as part of “Premium”.
  3. Open the Producer panel.
If you don’t see Media Studio
This is an eligibility/permissions issue. In that case you can use a third-party platform (e.g., Restream/Streamlabs) or contact X support/account management (if available).

3) Create an RTMP Source

  1. In Producer, go to Sources.
  2. Click Create source.
  3. Set:
    • Source type: RTMP
    • Region: choose the closest region (better stability/latency)
    • Source name: an easy label (e.g., “OBS - Brand”)
  4. Save with Create.

4) Copy RTMP/RTMPS URL and Stream Key

  1. Open the source you created (click it in Sources).
  2. Copy:
    • RTMP URL (or RTMPS URL if you prefer encrypted ingest)
    • RTMP(s) stream key
X/Twitter Media Studio: Source details showing RTMP URL, RTMPS URL and stream key
Figure 1 — Source details: RTMP URL, RTMPS URL and RTMP(s) stream key. Image source: LiveU Studio Support (Custom RTMP to Twitter).
RTMP vs RTMPS
If available, RTMPS (URL starting with rtmps://) encrypts the stream on the way to X. Use RTMPS if your encoder supports it.

5) Create a Broadcast (now or scheduled)

On X, you generally create a Broadcast that uses the Source you created.

5.1 Open “Broadcasts” and click “Create broadcast”

  1. Go to the Broadcasts tab.
  2. Click Create broadcast.
X/Twitter Media Studio Producer: Broadcasts tab and Create broadcast button
Figure 2 — Producer: Broadcasts tab and Create broadcast button. Image source: LiveU Studio Support.

5.2 Fill broadcast details and select the Source

  1. Enter a Broadcast name and category/description (if required).
  2. In the Source field, select your RTMP Source.
  3. Set Audience (Public/Private) and Schedule (Start immediately / Start later).
  4. Confirm with Create broadcast.
X/Twitter Media Studio: create broadcast screen with Source selector and scheduling options
Figure 3 — Create broadcast: select Source and set publishing/scheduling options. Image source: LiveU Studio Support.

6) Enter the values in OBS (Custom RTMP/RTMPS)

  1. Open OBS ? Settings ? Stream.
  2. Set Service to Custom… (or “Custom Streaming Server”).
  3. Paste the RTMP URL (or RTMPS URL) into the Server field.
  4. Paste the Stream Key into the Stream Key field.
  5. Save with Apply / OK.
OBS Studio: Settings > Stream with Custom server, URL and Stream key
Figure 4 — OBS: Settings ? Stream with Server and Stream Key fields. Image source: StreamShark Support (OBS screenshot).
Watch out for spaces
Copy/paste without leading/trailing spaces — they’re a common cause of “failed to connect”.

7) Go live and end the broadcast

  1. In OBS, click Start Streaming.
  2. Return to X Media Studio Producer and open your broadcast: you should see preview/stream health once the connection is active.
  3. Start the live (a “Go live/Start” button may be required in the UI).
  4. To end: stop streaming in OBS, then end/close the broadcast in X.
Posting the live
Some workflows also publish a post/tweet to announce the live from the Producer panel. If prompted, do it before or right after starting.

8) Recommended settings (compatibility)

Safe baseline RTMP settings. Adjust based on your bandwidth and stability.

Parameter Recommendation Notes
Video codec H.264 Most compatible.
FPS 30 fps Stable for most workflows.
Keyframe interval / GOP 2 seconds Commonly required/recommended.
Audio AAC 128–192 kbps @ 48 kHz 160 kbps is a good balance.
Rate control CBR when possible Helps ingest stability.
Upload rule of thumb
Keep total bitrate (video+audio) within ~60–70% of your real measured upload to avoid saturation and dropped frames.

9) Troubleshooting

Connection error / no preview

  • Copy the RTMP/RTMPS URL and Stream Key again (no spaces, no extra characters).
  • Confirm you selected the correct region (closest to you).
  • Try RTMPS if available (or switch back to RTMP) depending on encoder compatibility.
  • Verify your broadcast is using the correct source.

Choppy stream / low quality

  • Lower bitrate or resolution.
  • Use Ethernet and stop other uploads (cloud backups, calls, etc.).
  • Confirm 2-second keyframes and CBR.

You don’t see Media Studio/Producer

  • This is an access/eligibility issue. Check your account subscription/verification status and permissions.

10) FAQ

Does the Stream Key change?

The key can change if you create a new source or regenerate credentials. If you change the source, always update your encoder.

Does RTMP use username/password authentication?

Typically the “password” is the Stream Key. Traditional RTMP user/pass auth is not commonly used in X’s workflow.

How many sources can I create?

X may enforce limits on the number of sources (for example, some docs mention 100). If “Create source” doesn’t work, you may have hit a limit.



References: X Help — Media Studio Producer (RTMP)Restream Learn — Find X stream keySocialive — Stream to X via RTMPLiveU Studio Support — Custom RTMP to Twitter

Was this answer helpful? 0 Users Found This Useful (0 Votes)