Live streaming

Live Streams Limit

This endpoint provides the limit on live streams for your current plan.

POST https://api.dyntube.com/v1/live-streams/limit

Headers

Name / Value
NameValue
Content-Typeapplication/json
AuthorizationBearer

Body

Name / Type / Description
NameTypeDescription
planTypenumber1 //for standard plans

Response

200

json
{
  "limit": 1
}

400

json
{
  "error": "Bad request"
}

Code Samples

C#

csharp
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;

var payload = "{ \"planType\": 1 }";
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");

var res = await client.PostAsync(
    "https://api.dyntube.com/v1/live-streams/limit",
    new StringContent(payload, Encoding.UTF8, "application/json"));

System.Console.WriteLine(res.StatusCode);
System.Console.WriteLine(await res.Content.ReadAsStringAsync());

Node.js

javascript
const axios = require('axios');

async function limitStreams() {
  const res = await axios.post(
    'https://api.dyntube.com/v1/live-streams/limit',
    { planType: 1 },
    { headers: { Authorization: 'Bearer YOUR_API_KEY' } }
  );
  console.log(res.data);
}

limitStreams().catch(err => console.error(err.response?.data || err.message));

Python

python
import requests

res = requests.post(
    "https://api.dyntube.com/v1/live-streams/limit",
    json={"planType": 1},
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)

print(res.status_code, res.text)

PHP

php
<?php
$payload = ["planType" => 1];
$ch = curl_init("https://api.dyntube.com/v1/live-streams/limit");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_API_KEY",
        "Content-Type: application/json"
    ]
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "Status: {$status}\n";
echo $response;
  • Count live streams to check current usage.
  • Get live streams to review existing streams.
  • Create a live stream when the account has capacity.

Something missing or wrong here? Tell us and we will correct it. New to DynTube? Start with uploading and embedding.