Download Original Video

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

This endpoint will provide a link to your original video file that was uploaded. The response type will be text/plain.

{
    // Response
}

C# Sample

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

namespace GetOriginalFileUrlExample
{
    class Program
    {
        static async Task Main(string[] args)
        {
            string videoId = "your_video_id";
            string bearerToken = "your_bearer_token";
            string url = $"https://api.dyntube.com/v1/videos/{videoId}/original-file";

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

                var response = await client.GetAsync(url);

                if (response.IsSuccessStatusCode)
                {
                    var content = await response.Content.ReadAsStringAsync();
                    Console.WriteLine($"Original file URL: {content}");
                }
                else
                {
                    Console.WriteLine($"Error getting original file URL. Status code: {response.StatusCode}");
                }
            }
        }
    }
}

Node.js Sample

const axios = require('axios');

const videoId = 'your_video_id';
const bearerToken = 'your_bearer_token';
const url = `https://api.dyntube.com/v1/videos/${videoId}/original-file`;

const config = {
    headers: {
        Authorization: `Bearer ${bearerToken}`
    }
};

axios.get(url, config)
    .then(response => {
        if (response.status === 200) {
            console.log(`Original file URL: ${response.data}`);
        } else {
            console.log(`Error getting original file URL. Status code: ${response.status}`);
        }
    })
    .catch(error => {
        console.log(`Error getting original file URL. ${error}`);
    });

Python Sample

import requests

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

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

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

if response.status_code == 200:
    print(f'Original file URL: {response.content.decode()}')
else:
    print(f'Error getting original file URL. Status code: {response.status_code}')

PHP Sample

<?php

$videoId = 'your_video_id';
$bearerToken = 'your_bearer_token';
$url = "https://api.dyntube.com/v1/videos/{$videoId}/original-file";

$options = array(
    'http' => array(
        'header'  => "Authorization: Bearer {$bearerToken}\r\n",
        'method'  => 'GET',
    ),
);

$context  = stream_context_create($options);
$response = file_get_contents($url, false, $context);

if ($response) {
    echo "Original file URL: {$response}";
} else {
    echo "Error getting original file

Last updated