Follow the steps below to use Twitter's Media Studio to generate a Stream Key and Stream URL. Then, add the Stream Key and Stream URL to the settings of the Studio you want to stream from.
In order to stream directly to Twitter, you need to use its Media Studio, an invite-only feature not available to all Twitter users at this time. More information on the Media Studio is on Twitter's Help Center.
Step by step:
Using a computer, log in to your Twitter account.
Visit Twitter Media Studio's Broadcasts page and click on the Sources tab.
Click Create source.
For source type, select RTMP.
Enter a Source name for your live stream.
Select the Region closest to your location.
Select the source and copy your Stream Key and Stream URL.
Your stream will be visible on Twitter only after the Host starts the recording in the Studio.