Skip to main content

POST API to Create Real-Time Live streaming Room


POST
    https://<appname>.metered.live/api/v1/realtimelivestreaming/room

<appname> - replace it the name of your app.

info

You need to have Real-Time Live Streaming enabled in your account. To enable go to https://dashboard.metered.ca -> Live streaming

Description

This endpoint allows you to create a Live streaming room.

Parameters

ParametersDescriptionRequiredOptions
Query
secretKeystringyour secret keyyes-
Bodyapplication/json
roomNamestringIf not specified the room name will be auto-generated. Name should be URL friendly, do not put any spaces in the name.no-
enableLiveStreamingbooleanWhen enabled, livestreaming via HLS will be enabled. You will get a HLS URL for the meetingnotrue
displayMessagestringMessage to display when livestream is not runningno
customCSSstringCustom CSS to customize the viewerno
enableRecordingbooleanWhen enabled livesteam will be recorderno
recordCompositionbooleanWhen enabled audio+video will be recorded in a single video streamno
enableRTMPOutbooleanEnable RTMP Out to 3rd party servicesno
rtmpOutURLstringURL of 3rd party livestreaming service like YouTube Liveno

Request Samples

cURL
curl --request POST \
--url 'https://appname.metered.live/api/v1/realtimelivestreaming/room?secretKey={replace_this_with_your_secretKey}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"roomName": "mystreamingroom"
}
'

Responses

200
{
"viewerURL": "https://livestreamingdemo.metered.live/62d81eff8196a70d5d29538e/player",
"broadcastManager": "https://dashboard.metered.ca/livestreaming-rooms/62d81eff8196a70d5d29538e/app/62b5d44bd00c04354f16af71/broadcast",
"roomName": "mystreamingroom",
"currentlyBroadcasting": false,
"created": "2022-07-20T15:27:59.002Z",
"_id": "62d81eff8196a70d5d29538e"
}
400

{
"success": false,
"message": "Invalid request"
}