Videos

Get Video Status

This endpoint returns the current processing status for a video.

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

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.

200: OK Status of the video

json
{
  "status": 3,
  "statusName": "Published"
}

Value of Video Status

Possible video status values:

Description of Status / Value
Description of StatusValue
NA0
Uploaded1
Processing2
Published3
Error-1

C# Sample

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

var videoId = "your_video_id";
var apiUrl = $"https://api.dyntube.com/v1/videos/{videoId}/status";
var bearerToken = "your_bearer_token";

using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", bearerToken);

var response = await client.GetAsync(apiUrl);
response.EnsureSuccessStatusCode();
var statusString = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Status: {statusString}");

Node.js Sample

javascript
import axios from 'axios';

async function checkVideoStatus(videoId, bearerToken) {
  try {
    const response = await axios.get(`https://api.dyntube.com/v1/videos/${videoId}/status`, {
      headers: {
                Authorization: `Bearer ${bearerToken}`
            }
        });

        const status = response.data;

        if (status === '3') {
            console.log('The video has been published.');
        } else {
            console.log('The video has not been published yet.');
        }
    } catch (error) {
        console.error(error);
  }
}

checkVideoStatus('your_video_id', 'your_bearer_token');

Python Sample

python
import requests

video_id = "your_video_id"
api_url = f"https://api.dyntube.com/v1/videos/{video_id}/status"
headers = {"Authorization": "Bearer your_bearer_token"}

resp = requests.get(api_url, headers=headers)
resp.raise_for_status()
status = resp.text.strip()
print(f"Status: {status}")

PHP Sample

php
function check_video_status($video_id, $bearer_token) {
  $headers = [
    "Authorization: Bearer $bearer_token"
  ];

  $ch = curl_init("https://api.dyntube.com/v1/videos/$video_id/status");
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($ch);
  $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  curl_close($ch);

  if ($http_status == 200) {
    $status = json_decode($response);
    if ($status == '3') {
      echo "The video has been published.\n";
    } else {
      echo "The video has not been published yet.\n";
    }
  } else {
    echo "Error checking video status. Status code: $http_status\n";
  }
}
  • Get video to retrieve playback URLs after the video is published.
  • Get videos to list recent uploads and their statuses.
  • Setting up webhooks to receive publish notifications instead of polling.

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