Live streaming
Get a Live Stream
Get a single live stream
This endpoint returns a live stream with the provided ID.
GET https://api.dyntube.com/v1/live-streams/{id}
Headers
| Name | Type | Description |
|---|---|---|
| Authorization | String | Bearer YOUR_API_KEY |
Path Parameters
| Name | Type | Description |
|---|---|---|
| id | String | Project id |
200: OK Object in JSON format
json
{
"id": "6dWVR5343889MV3lQ",
"name": "My Stream",
"description": "",
"region": "euc",
"auth": false,
"encrypt": false,
"record": false,
"storageProjectId": "",
"platforms": [
{
"service": 4,
"address": "rtmp://syd03.contribute.live-video.net/app",
"streamKey": "1211212"
}
],
"ingestUrl": "rtmp://euc.stream.dyntube.com/app",
"playerUrl": "https://api.dyntube.com/live/abc123",
"hlsUrlWeb": "https://hls-web.dyntube.com/playlist.m3u8",
"hlsUrl": "https://hls-mobile.dyntube.com/playlist.m3u8"
}400: Live stream not found
json
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Not Found",
"status": 404,
"traceId": "00-fc3d66e5001efa41d7ce56-c691caa6cf06b649-00"
}Code Samples
C#
csharp
using System.Net.Http;
using System.Net.Http.Headers;
var streamId = "6dWVR5343889MV3lQ";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");
var res = await client.GetAsync($"https://api.dyntube.com/v1/live-streams/{streamId}");
var body = await res.Content.ReadAsStringAsync();
System.Console.WriteLine(body);Node.js
javascript
const axios = require('axios');
async function getStream(id) {
const res = await axios.get(`https://api.dyntube.com/v1/live-streams/${id}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' }
});
console.log(res.data);
}
getStream('6dWVR5343889MV3lQ').catch(err => console.error(err.response?.data || err.message));Python
python
import requests
stream_id = "6dWVR5343889MV3lQ"
res = requests.get(
f"https://api.dyntube.com/v1/live-streams/{stream_id}",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
print(res.status_code, res.text)PHP
php
<?php
$streamId = "6dWVR5343889MV3lQ";
$ch = curl_init("https://api.dyntube.com/v1/live-streams/{$streamId}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"]
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: {$status}\n";
echo $response;Related Pages
- Update a live stream to change stream settings.
- Delete a live stream to remove a stream.
- Get live streaming recording to find recorded videos for a stream.
Something missing or wrong here? Tell us and we will correct it. New to DynTube? Start with uploading and embedding.