Videos
Fetch embed
GET
/
v1
/
videos
/
{id}
/
embed
Fetch embed
curl --request GET \
--url https://api.vturb.com/v1/videos/{id}/embed \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vturb.com/v1/videos/{id}/embed"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vturb.com/v1/videos/{id}/embed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vturb.com/v1/videos/{id}/embed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vturb.com/v1/videos/{id}/embed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vturb.com/v1/videos/{id}/embed")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vturb.com/v1/videos/{id}/embed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"embed": "<script type=\"text/javascript\"> var s=document.createElement(\"script\"); s.src=\"https://scripts.converteai.net/lib/js/smartplayer-wc/v4/sdk.js\", s.async=!0,document.head.appendChild(s); </script> <div id=\"ifr_652f2b1e8f1b2c3d4e5f6a7b_wrapper\" style=\"margin: 0 auto; width: 100%; \"> <div style=\"position: relative; padding: 56.25% 0 0 0;\" id=\"ifr_652f2b1e8f1b2c3d4e5f6a7b_aspect\"> <iframe frameborder=\"0\" allowfullscreen src=\"about:blank\" id=\"ifr_652f2b1e8f1b2c3d4e5f6a7b\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%;\" referrerpolicy=\"origin\" onload=\"this.onload=null,this.src='https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/embed.html'+(location.search||'?')+'&vl='+encodeURIComponent(location.href)\"></iframe> </div> </div>",
"metatags": "<link rel=\"preload\" href=\"https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/embed.html\">\n<script>!function(i,n){i._plt=i._plt||(n&&n.timeOrigin?n.timeOrigin+n.now():Date.now())}(window,performance);</script>\n<link rel=\"preload\" href=\"https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/player.js\" as=\"script\">\n<link rel=\"preload\" href=\"https://scripts.converteai.net/lib/js/smartplayer-wc/v4/smartplayer.js\" as=\"script\">\n<link rel=\"preload\" href=\"https://cdn.converteai.net/org_123/507f191e810c19729de860ea/main.m3u8\" as=\"fetch\">\n<link rel=\"dns-prefetch\" href=\"https://cdn.converteai.net\">\n<link rel=\"dns-prefetch\" href=\"https://scripts.converteai.net\">\n<link rel=\"dns-prefetch\" href=\"https://images.converteai.net\">\n<link rel=\"dns-prefetch\" href=\"https://license.vturb.com\">"
}{
"type": "https://docs.vturb.com/errors/unauthorized",
"code": "unauthorized",
"message": "Missing or invalid API credential. Send a vt_ token in the Authorization header.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/forbidden",
"code": "forbidden",
"message": "The credential is missing the scope this action requires.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/not_found",
"code": "not_found",
"message": "Resource not found.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/unprocessable_content",
"code": "unprocessable_content",
"message": "The request is invalid. See errors for the fields that failed.",
"request_id": "00000000-0000-0000-0000-000000000000",
"errors": [
{
"field": "type",
"message": "is not included in the list"
}
]
}Authorizations
Paste your VTurb API token (vt_...). Sent as Authorization: Bearer <token>.
Path Parameters
Query Parameters
Which snippet to render. lesson requires the lesson-embed feature on the account.
Available options:
js, iframe, lesson Was this page helpful?
⌘I
Fetch embed
curl --request GET \
--url https://api.vturb.com/v1/videos/{id}/embed \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vturb.com/v1/videos/{id}/embed"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vturb.com/v1/videos/{id}/embed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vturb.com/v1/videos/{id}/embed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vturb.com/v1/videos/{id}/embed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vturb.com/v1/videos/{id}/embed")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vturb.com/v1/videos/{id}/embed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"embed": "<script type=\"text/javascript\"> var s=document.createElement(\"script\"); s.src=\"https://scripts.converteai.net/lib/js/smartplayer-wc/v4/sdk.js\", s.async=!0,document.head.appendChild(s); </script> <div id=\"ifr_652f2b1e8f1b2c3d4e5f6a7b_wrapper\" style=\"margin: 0 auto; width: 100%; \"> <div style=\"position: relative; padding: 56.25% 0 0 0;\" id=\"ifr_652f2b1e8f1b2c3d4e5f6a7b_aspect\"> <iframe frameborder=\"0\" allowfullscreen src=\"about:blank\" id=\"ifr_652f2b1e8f1b2c3d4e5f6a7b\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%;\" referrerpolicy=\"origin\" onload=\"this.onload=null,this.src='https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/embed.html'+(location.search||'?')+'&vl='+encodeURIComponent(location.href)\"></iframe> </div> </div>",
"metatags": "<link rel=\"preload\" href=\"https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/embed.html\">\n<script>!function(i,n){i._plt=i._plt||(n&&n.timeOrigin?n.timeOrigin+n.now():Date.now())}(window,performance);</script>\n<link rel=\"preload\" href=\"https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/player.js\" as=\"script\">\n<link rel=\"preload\" href=\"https://scripts.converteai.net/lib/js/smartplayer-wc/v4/smartplayer.js\" as=\"script\">\n<link rel=\"preload\" href=\"https://cdn.converteai.net/org_123/507f191e810c19729de860ea/main.m3u8\" as=\"fetch\">\n<link rel=\"dns-prefetch\" href=\"https://cdn.converteai.net\">\n<link rel=\"dns-prefetch\" href=\"https://scripts.converteai.net\">\n<link rel=\"dns-prefetch\" href=\"https://images.converteai.net\">\n<link rel=\"dns-prefetch\" href=\"https://license.vturb.com\">"
}{
"type": "https://docs.vturb.com/errors/unauthorized",
"code": "unauthorized",
"message": "Missing or invalid API credential. Send a vt_ token in the Authorization header.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/forbidden",
"code": "forbidden",
"message": "The credential is missing the scope this action requires.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/not_found",
"code": "not_found",
"message": "Resource not found.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/unprocessable_content",
"code": "unprocessable_content",
"message": "The request is invalid. See errors for the fields that failed.",
"request_id": "00000000-0000-0000-0000-000000000000",
"errors": [
{
"field": "type",
"message": "is not included in the list"
}
]
}