Applies to: Wowza Video REST API v2.0 and later
This quick-start tutorial shows developers how to use the Wowza Video 2.0 REST API to create a Web Real-Time Communication (WebRTC) live stream, connect a video source, and deliver it to a Wowza-hosted player page in a few API calls. You'll also learn how to programmatically start and stop the stream so you can integrate the full workflow into a code-based solution.
This tutorial applies to Wowza Video REST API v2.0 and later only.
This tutorial requires:
- A JSON Web Token (JWT) for a Wowza Video account. If you don't have an account, see Wowza Video free trial for sign-up instructions and trial limitations.
- cURL, Postman, or another REST API client. For installation and usage instructions, refer to the documentation for whichever client you choose.
Tips for working through this tutorial:
Sample code: This tutorial uses environment variables for your JWT in the cURL examples so you can copy, paste, and run commands in your terminal without manually replacing values. After you get your JWT in step 1, set the environment variable on your computer. See How to set environment variables for Wowza Video API testing for instructions. If you skip this, you'll need to manually enter the correct value in each code sample.
API reference: Each step links to the relevant endpoint reference so you can explore all available parameters for that request.
You'll use an access token, also called a JSON Web Token (JWT), to authenticate each API request. The token identifies both the Wowza Video account and the specific user making the call.
There are two types of access tokens:
- Personal access tokens: Available to all users with a Wowza Video license. These tokens are tied to a specific user and work well for quick tests or manual actions that don't need to persist if the user leaves the organization.
- System access tokens: Available to organization owners only. These tokens belong to the organization rather than to any individual user, which makes them the right choice for production integrations that need to remain active after specific users leave.
Generate the token in the Wowza Video user interface.
In the left navigation, click your user name and choose Token Management.

In the Token Management portal, add a new token. Choose a personal access token or, if you're an organization owner, a system token. If you're an organization member who needs a system-level token, contact your organization owner.
Copy the token and store it in a safe location. You won't be able to view it again after leaving this page.

For a full explanation of token types and scopes, see Wowza Video REST API authentication (JWT, personal tokens, and system tokens).
The quickest path to your first broadcast is a live stream. In Wowza Video, a live stream automatically handles the configuration and processing required to deliver your content to a global audience.
A single API call to POST /live_streams:
- Specifies how the video source connects to Wowza Video
- Generates a Wowza-hosted webpage to send your viewers to
- Assigns a player configuration for styling and branding
To create a live stream that receives a WebRTC source, send the following request.
For this tutorial, use the sample code as shown with these changes:
- Replace
${WV_JWT}with your JWT from step 1. If you set the environment variable as described in the prerequisites, no changes are needed. - (Optional) By default, the live stream uses your account's default player configuration. To use a branded player, create a player configuration in the Wowza Video UI under Players > Configurations, then pass its ID (for example,
affaa6b7-aeb0-4961-92a0-5319423867fd) in theplayer_idfield. This tutorial uses the default player, soplayer_idis omitted.
cURL request: POST /live_streams (API v2.0)
Endpoint Reference
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${WV_JWT}" \
-d '{
"live_stream": {
"broadcast_location": "us_west_california",
"delivery_method": "push",
"encoder": "other_webrtc",
"name": "My Live Stream"
}
}' "${WV_HOST}/api/${WV_VERSION}/live_streams"JSON response: POST /live_streams
The response includes:
- An
idthat identifies the live stream. You'll use this value in later steps. - A
source_connection_informationobject to configure the WebRTC publish page as the video source. You'll complete this in step 3. - Additional details about the live stream configuration.
{
"live_stream": {
"id": "1234abcd",
"name": "MyWebRTCStream",
...
"encoder": "other_webrtc",
...
"source_connection_information": {
"sdp_url": "wss://[subdomain].entrypoint.video.wowza.com/webrtc-session.json",
"application_name": "app-30zl5349",
"stream_name": "32a5814b"
}
...
}
}Use the source_connection_information values from the POST /live_streams response to configure the WebRTC publish page as your video source. WebRTC lets you capture video directly from your browser without installing plugins or third-party software.
In a new browser tab, go to wowza.com/webrtc/publish. Grant access to your camera and microphone when prompted.
InfoThe WebRTC hosted publish page is supported on the latest versions of Chrome and Safari, and on Edge version 79 and later.

Click Settings in the upper-right corner of the page.
Using the
source_connection_informationfrom the step 2 response, enter the following values:JSON: source_connection_information from the POST /live_streams response (API v2.0)
"source_connection_information": { "sdp_url": "wss://[subdomain].entrypoint.video.wowza.com/webrtc-session.json", "application_name": "app-30zl5349", "stream_name": "32a5814b" }- Enter the
sdp_urlvalue in the SDP URL field. - Enter the
application_namevalue in the Application Name field. - Enter the
stream_namevalue in the Stream Name field. - Leave Audio Bitrate and Video Bitrate at their default values.
- Enter the
Close the Settings dialog to apply your changes.
Start the stream in Wowza Video first so it's ready to process the incoming video, then start the stream on the WebRTC publish page.
For active subscriptions, charges start accruing when you start the stream in Wowza Video. See Wowza Video free trial for trial subscription features and limitations.
Send the following request to start the live stream. Replace [live_stream_id] with the id value returned in step 2.
cURL request: PUT /live_streams/{live_stream_id}/start (API v2.0)
Endpoint Reference
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${WV_JWT}" \
"https://api.video.wowza.com/api/${WV_VERSION}/live_streams/[live_stream_id]/start"
# Replace [live_stream_id] with the id from step 2The response shows the live stream state as start (starting).
Wait 20 seconds for the live stream to finish starting up, then click Publish on the WebRTC publish page.
Wowza Video is now receiving, processing, and delivering the stream to the player on your hosted page.
Use the source_connection_information from the POST /live_streams response to configure the WebRTC playback page, which is optimized for low-latency WebRTC playback.
In a new browser tab, go to wowza.com/webrtc/play.
InfoThe WebRTC hosted playback page is supported on the latest versions of Chrome and Safari, and on Edge version 79 and later.

Click Settings in the upper-right corner of the page.
Using the
source_connection_informationfrom the step 2 response, enter the following values:JSON: source_connection_information from the POST /live_streams response (API v2.0)
"source_connection_information": { "sdp_url": "wss://[subdomain].entrypoint.video.wowza.com/webrtc-session.json", "application_name": "app-30zl5349", "stream_name": "32a5814b" }- Enter the
sdp_urlvalue in the SDP URL field. - Enter the
application_namevalue in the Application Name field. - Enter the
stream_namevalue in the Stream Name field.
- Enter the
Close the Settings dialog to apply your changes, then click play to view the stream.
Stop both the video source and the live stream in Wowza Video. If you forget to stop the stream in Wowza Video, charges continue to accrue.
Transcoding charges accrue for started live streams even when they aren't actively streaming content. Wowza Video automatically stops idle live streams after 20 minutes, but stop your stream as soon as your event ends to avoid unnecessary charges. See Wowza Video free trial for trial subscription features and limitations.
On the WebRTC publish page, click Stop.
Send the following request to stop the live stream. Replace [live_stream_id] with the id value returned in step 2.
cURL request: PUT /live_streams/{live_stream_id}/stop (API v2.0)
curl -X PUT \
-H "Authorization: Bearer ${WV_JWT}" \
"https://api.video.wowza.com/api/${WV_VERSION}/live_streams/[live_stream_id]/stop"
# Replace [live_stream_id] with the id from step 2The response shows the live stream state as stop (stopped).
You've completed your first live stream using the Wowza Video 2.0 REST API. You used a WebRTC encoder to push video to Wowza Video, which processed and delivered it to your viewers.
To continue building your streaming solution:
- Query a live stream with GET /live_streams/{live_stream_id} to retrieve live stream details and status programmatically.
- Browse the Guides section of the navigation for advanced REST API workflows, including transcoder configuration, multi-bitrate output, and playback customization.