curl --request GET \
--url https://api.pnplayer.com/v1/api/video \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.pnplayer.com/v1/api/video"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://api.pnplayer.com/v1/api/video', 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.pnplayer.com/v1/api/video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <api-key>"
],
]);
$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.pnplayer.com/v1/api/video"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth-Token", "<api-key>")
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.pnplayer.com/v1/api/video")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"totalItems": 123,
"currentPage": 123,
"itemsPerPage": 10,
"items": [
{
"videoId": "657bb740-a71b-4529-a012-528021c31a92",
"title": "<string>",
"dateUploaded": "2023-11-07T05:31:56Z",
"encodeProgress": 123,
"status": 0,
"length": 123,
"storageSize": 123,
"hlsUrl": "<string>",
"preview": "<string>"
}
],
"totalVideos": 123
}{
"message": "Forbidden"
}{
"message": "<string>"
}List videos
Returns a paginated list of the account’s videos, ten per page. All filters are optional and combine with AND. Requires the READ_MEDIA scope.
curl --request GET \
--url https://api.pnplayer.com/v1/api/video \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.pnplayer.com/v1/api/video"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://api.pnplayer.com/v1/api/video', 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.pnplayer.com/v1/api/video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <api-key>"
],
]);
$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.pnplayer.com/v1/api/video"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth-Token", "<api-key>")
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.pnplayer.com/v1/api/video")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"totalItems": 123,
"currentPage": 123,
"itemsPerPage": 10,
"items": [
{
"videoId": "657bb740-a71b-4529-a012-528021c31a92",
"title": "<string>",
"dateUploaded": "2023-11-07T05:31:56Z",
"encodeProgress": 123,
"status": 0,
"length": 123,
"storageSize": 123,
"hlsUrl": "<string>",
"preview": "<string>"
}
],
"totalVideos": 123
}{
"message": "Forbidden"
}{
"message": "<string>"
}Authorizations
API key created in the dashboard or via POST /v1/api/api-keys. Keys are prefixed pn_ and do not expire until revoked.
Query Parameters
Page number, starting at 1
x >= 1Case-insensitive match against the title or the video ID
Only videos uploaded on or after this date (YYYY-MM-DD)
Only videos uploaded on or before this date (YYYY-MM-DD)
Comma-separated status codes. A video matches if it has any of them. See VideoSummary.status for the codes.
"3,4"
Minimum duration in whole seconds
x >= 0Maximum duration in whole seconds
x >= 0true returns only videos with at least one caption track, false only videos with none
true, false Filter by audio extraction state. none means extraction has not been recorded.
ready, pending, failed, none Sort order. Unknown values fall back to newest.
newest, oldest, title, title_desc, longest, shortest, largest, smallest Comma-separated tag IDs. A video matches if it has any of them.
"3,7,12"
