Video Livestream docs

This page shows you the API calls required to implement our livestreaming. The API requires a token which you can retrieve after creating a my.isset.video account.


Get your token
The token required by the livestream API is available at https://my.isset.video/tokens/. You will find your token under System tokens. Copy the token named publisher there.
List livestreams

The following request is used to retrieve a list of livestreams available for your account.

GET https://publish.isset.video/api/livestreams with the supplied x-auth-token in the header. x-token-auth: your-token-here

Available query parameters:

offset
Show livestreams starting from this offset
Example: https://publish.isset.video/api/livestreams?offset=10
limit
Show this amount of livestreams
Example: https://publish.isset.video/api/livestreams?size=5

Curl PHP example:

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://publish.isset.video/api/livestreams",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "x-token-auth: {your-token-here}",
        "Content-Type: application/json"
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                        

This will result in the following response.

{
    "total": 1,
    "from": 0,
    "size": 20,
    "results": [
        {
            "uuid": "49875972-26f7-4697-8d06-17ea34d16577",
            "stream_key": "example-key",
            "rtmp_url": "rtmp://livestream.isset.video/src/",
            "name": "Livestream 01-01-2020",
            "description": null,
            "date_created": "2020-01-01T01:01:01+00:00",
            "date_updated": "2020-01-01T01:01:01+00:00",
            "date_started": "2020-01-01T01:01:01+00:00",
            "date_ended": null,
            "archive_uuid": null
        }
    ]
}
                        
Create livestream

The following request is used to create a livestream. Note that a livestream can also be created by broadcasting to the RTMP url.

POST https://publish.isset.video/api/livestreams/create with the supplied x-auth-token in the header. x-token-auth: your-token-here

Curl PHP example:

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://my.videopublisher.io/api/livestreams/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "x-token-auth: {your-token-here}",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                        

This will result in the following response.

{
    "uuid": "49875972-26f7-4697-8d06-17ea34d16577",
    "stream_key": "example-key",
    "rtmp_url": "rtmp://livestream.isset.video/src/",
    "name": "Livestream 01-01-2020",
    "description": null,
    "date_created": "2020-01-01T01:01:01+00:00",
    "date_updated": "2020-01-01T01:01:01+00:00",
    "date_started": null,
    "date_ended": null,
    "archive_uuid": null
}
                        
Play livestream

The following request is used to retrieve the playout url (or player) for a livestream. Add the client ip to make sure this playout url is only usable by one client.

GET https://publish.isset.video/api/livestreams/{livestreamUuid}?clientIp={yourClientIp} with the supplied x-auth-token in the header. x-token-auth: your-token-here

clientIp
The IP of the user requesting to watch the livestream. This IP will be validated so this playout url cannot be used by other users.
Example: https://publish.isset.video/api/livestream/49875972-26f7-4697-8d06-17ea34d16577?clientIp=192.0.0.1

Curl PHP example:

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://my.videopublisher.io/api/livestreams/{your-publish-uuid-here}?clientIp={your-client-ip-here}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "x-token-auth: {your-token-here}",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                        

This will result in the following response.

{
    "uuid": {your-publish-uuid-here}
    "stream_key": "example-key",
    "rtmp_url": "rtmp://livestream.isset.video/src/",
    "name": "Livestream 01-01-2020",
    "description": null,
    "date_created": "2020-01-01T01:01:01+00:00",
    "date_updated": "2020-01-01T01:01:01+00:00",
    "date_started": "2020-01-01T01:01:01+00:00",
    "date_ended": null,
    "archive_uuid": null,
    "share_url": "https://publish.isset.video/livestreams/share/example-share-key",
    "embed_url": "https://publish.isset.video/livestreams/embed/example-embed-key",
    "playout_url": "https://live.stream.isset.video/X7B27x/lWorblo8/4DsWs1ZuTqlhHJ81r4LPkA/1611775702/91a9d623.m3u8"
}