Skip to main content

Live Stream APIs

This guide provides step-by-step instructions on starting and stopping livestreaming for your Dyte meetings using simple API calls.

Prerequisites​

Start a livestream​

To start livestreaming a meeting, do the following:

Step 1: Get your API Keys​

Login to the Developer Portal and create an account. Copy the API Keys for your organization from the Developer portal. These API Keys are unique to your organization and are required to use Dyte REST APIs such as when instantiating a meeting.

Step 2: Create a live stream​

To start live streaming, specify the meeting ID of the meeting that you want to live stream. You can obtain the meeting ID by doing the following:

  • If you've already created the meeting, use the Fetch all meetings API to view all the meetings for your organization.
  • If you've not created a meeting yet, use the Create a meeting API to create the meeting that you want to live stream.

These API returns a parameter called id, which is your meeting ID.

note

You can also start livestreaming as soon as the meeting starts, by passing live_stream_on_start: true in the Create a meeting API.

Request​

In the Start livestreaming a meeting specify the ID of the meeting that you want to live stream as the following:

curl --request POST \
--url https://api.cluster.dyte.in/v2/meetings/{meetingId}/livestreams \
--header 'Authorization: Basic <token>' \
--header 'Content-Type: application/json'

Response​

{
"success": true,
"data": {
"status": "OFFLINE",
"name": null,
"meeting_id": "188566bc-8770-4ca0-9eb3-24b594ecaf7e",
"ingest_server": "rtmps://2ec802dd47b0.global-contribute.live-video.net:443/app/",
"id": "7088bba8-f522-49a8-b59b-3cd0e946bbb0",
"stream_key": "sk_ap-south-1_AfnVpeYZjidO_fBpWKody7sDUOEfy9Zc6XAZegkR0Va",
"playback_url": "https://2ec802dd47b0.ap-south-1.playback.live-video.net/api/video/v1/ap-south-1.9449086423410.channel.rVGDS2KM5Lnteh.m3u8"
}
}

Fetch details of an active livestream​

Fetching details of an active livestream is also an HTTP request away.

Request​

Specify the meeting_id of the meeting for which you want to fetch the active livestream.

Use the Fetch all meetings or Create a meeting API to get the meeting ID. The API returns a parameter called id, which is your meeting ID.

curl --request GET \
--url https://api.cluster.dyte.in/v2/meetings/{meetingId}/active-livestream \
--header 'Authorization: Basic <token>' \
--header 'Content-Type: application/json'

Response​

{
"success": true,
"data": {
"status": "LIVE",
"name": null,
"meeting_id": "188566bc-8770-4ca0-9eb3-24b594ecaf7e",
"ingest_seconds": 0,
"viewer_seconds": 0,
"ingest_server": "rtmps://2ec802dd47b0.global-contribute.live-video.net:443/app/",
"id": "7088bba8-f522-49a8-b59b-3cd0e946bbb0",
"stream_key": "sk_ap-south-1_AfnVpeYZjidO_fBpWKody7sDUOEfy9Zc6XAZegkR0Va",
"playback_url": "https://2ec802dd47b0.ap-south-1.playback.live-video.net/api/video/v1/ap-south-1.944908621410.channel.rVKA2KM5Lunt.m3u8"
}
}

You can also use the Fetch all livestreams for a meeting API or Fetch all livestreams to get livestream details.

Stop a livestream​

To stop live streaming of a meeting, provide the id of that meeting in the following request.

Use the Fetch all meetings or Create a meeting API to get the meeting ID. The API returns a parameter called id, which is your meeting ID.

Request​

curl --request POST \
--url https://api.cluster.dyte.in/v2/meetings/meetingId/active-livestream/stop \
--header 'Authorization: Basic <token>' \
--header 'Content-Type: application/json'

Response​

{
"success": true,
"data": {
"message": "livestream stopped"
}
}

Livestreaming Stage Management APIs​

Dyte's livestreaming stage management APIs allow you to manage stage requests, such as leave and join stage, manage permissions, kick participants and so on. For more information, see Livestreaming Stage Management APIs.

Livestreaming Properties, Functions, and Events​

For the detailed information on livestreaming properties, events, and functions, see Livestreaming: Properties, Functions, and Events.