Videos

Get Video

Retrieve the current metadata, playback, and processing details for one video.

Get a Single Video

This endpoint returns a single video with the provided video ID.

GET https://api.dyntube.com/v1/videos/{id}

Path Parameters

Name / Type / Description
NameTypeDescription
id*StringVideo ID. This is not the same as the channelKey from the embed code. Use the id returned by the video list API or shown in the dashboard.

Query Parameters

Name / Type / Description
NameTypeDescription
includeOriginalFileBooleanOptional. Set to true to include a signed original file download URL in original.url. The original file URL expires after 12 hours.

200: OK Video object in JSON format

json
{
    "id": "fFL56RU6PjvJPeE",
    "duration": "00:02:30.1270000",
    "projectId": "unjVhFJ7vAhrYu9",
    "accountKey": "6aG9UBe5rGPzjbh",
    "region": "use-s",
    "captions": [],
    "key": "NULPJ7mWDuyj4w5",
    "channelKey": "f8RMr2q4h6yNpv9",
    "privateLink": "QBr6n8HN878t5sH",
    "hlsLink": "Sx5FTtWsUU8tmux",
    "planType": 1,
    "mp4Url": "",
    "mp4Urls": [],
    "formats": {
        "hls": true,
        "mp4": false
    },
    "hlsUrl": "https://api.dyntube.com/v1/apps/hls/FhyinduNY4Kr9Q.m3u8",
    "hlsUrlWeb": "https://api.dyntube.com/v1/apps/hls/FhyinduNY4Kr9Q.m3u8",
    "title": "My Video",
    "description": "",
    "options": {
        "autoplay": false,
        "playerColor": "rgba(255, 65, 113, 0.83)",
        "playerSkin": "solid",
        "controlsColor": "#FFFFFF",
        "seekButtons": false,
        "volumeControl": true,
        "preload": "auto",
        "fullscreenControl": true,
        "controls": true,
        "stickyControls": false,
        "defaultQuality": "",
        "qualityControl": true,
        "speedControl": true,
        "fastForward": true,
        "bigPlayControl": true,
        "playControl": true,
        "volume": 1.0,
        "loop": false,
        "muted": false,
        "modal": false
    },
    "tags": [],
    "version": 1,
    "original": {
        "height": 720,
        "width": 1280,
        "url": "https://cdn.example.com/path/original.mp4?md5=...&expires=..."
    },
    "status": 3,
    "statusName": "Published",
    "created": "2016-08-27T12:37:24.4970796+00:00"
}

404: Not Found If video not found

json
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
    "title": "Not Found",
    "status": 404,
    "traceId": "00-fc3d66e5001efa41d7ce56-c691caa6cf06b649-00"
}

C# Sample

csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
using System.Threading.Tasks;

namespace SingleVideo
{
    class Program
    {
        private static readonly HttpClient client = new HttpClient();

        static async Task Main(string[] args)
        {
            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "your_bearer_token");

            var videoId = "your_video_id";
            var response = await client.GetAsync($"https://api.dyntube.com/v1/videos/{videoId}");

            if (response.IsSuccessStatusCode)
            {
                var responseContent = await response.Content.ReadAsStringAsync();
                var video = JsonSerializer.Deserialize<Video>(responseContent);

                Console.WriteLine("ID: " + video.Id);
                Console.WriteLine("Title: " + video.Title);
                Console.WriteLine("Description: " + video.Description);
                Console.WriteLine("hlsUrl: " + video.HlsUrl);
                Console.WriteLine("hlsUrlWeb: " + video.HlsUrlWeb);
                Console.WriteLine("mp4Url: " + video.Mp4Url);
            }
            else
            {
                Console.WriteLine("Error getting video. Status code: " + response.StatusCode);
            }
        }
    }

    class Video
    {
        public string Id { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public string HlsUrl { get; set; }
        public string HlsUrlWeb { get; set; }
        public string Mp4Url { get; set; }
    }
}

Node.js

javascript
const axios = require('axios');

const videoId = 'your_video_id';
const bearerToken = 'your_bearer_token';

async function getVideo() {
  try {
    const response = await axios.get(`https://api.dyntube.com/v1/videos/${videoId}`, {
      headers: {
        Authorization: `Bearer ${bearerToken}`
      }
    });
    const video = response.data;
    console.log('ID:', video.id);
    console.log('Title:', video.title);
    console.log('Description:', video.description);
    console.log('hlsUrl:', video.hlsUrl);
    console.log('hlsUrlWeb:', video.hlsUrlWeb);
    console.log('mp4Url:', video.mp4Url);
  } catch (error) {
    console.error(error);
  }
}

getVideo();

Python

python
import requests

video_id = 'your_video_id'
bearer_token = 'your_bearer_token'
url = f'https://api.dyntube.com/v1/videos/{video_id}'

headers = {
    'Authorization': f'Bearer {bearer_token}'
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    video = response.json()
    print('ID:', video['id'])
    print('Title:', video['title'])
    print('Description:', video['description'])
    print('hlsUrl:', video['hlsUrl'])
    print('hlsUrlWeb:', video['hlsUrlWeb'])
    print('mp4Url:', video['mp4Url'])
else:
    print('Error getting video. Status code:', response.status_code)

PHP

php
<?php
$video_id = 'your_video_id';
$bearer_token = 'your_bearer_token';
$url = "https://api.dyntube.com/v1/videos/{$video_id}";

$headers = array(
    'Authorization: Bearer ' . $bearer_token
);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

if (!$response) {
    echo 'Error getting video: ' . curl_error($ch);
} else {
    $video = json_decode($response, true);
    echo "ID: " . $video['id'] . "\n";
    echo "Title: " . $video['title'] . "\n";
    echo "Description: " . $video['description'] . "\n";
    echo "hlsUrl: " . $video['hlsUrl'] . "\n";
    echo "hlsUrlWeb: " . $video['hlsUrlWeb'] . "\n";
    echo "mp4Url: " . $video['mp4Url'] . "\n";
}

curl_close($ch);
?>
  • Update video to change title, description, options, or tags.
  • Add captions, subtitles, or chapters to attach text tracks.
  • Update video image to replace the thumbnail.
  • Token Authentication for signed HLS playback URLs.

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