Get a playlist
curl --request GET \
--url https://api.pnplayer.com/v1/api/playlist/{id} \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.pnplayer.com/v1/api/playlist/{id}"
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/playlist/{id}', 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/playlist/{id}",
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/playlist/{id}"
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/playlist/{id}")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/playlist/{id}")
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{
"playlistId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"type": "manual",
"thumbnailUrl": "<string>",
"videoCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"rules": [
{
"field": "tag",
"operator": "contains",
"value": "<string>",
"logic": "AND"
}
],
"videos": [
{
"videoId": "<string>",
"title": "<string>",
"preview": "<string>",
"length": 123,
"order": 123
}
]
}{
"message": "Forbidden"
}{
"message": "Not found"
}Playlists
Get a playlist
Returns the playlist with its manually added videos in order. For dynamic playlists use GET /v1/api/playlist/{id}/resolve to get the rule matches. Requires the READ_MEDIA scope.
GET
/
v1
/
api
/
playlist
/
{id}
Get a playlist
curl --request GET \
--url https://api.pnplayer.com/v1/api/playlist/{id} \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.pnplayer.com/v1/api/playlist/{id}"
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/playlist/{id}', 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/playlist/{id}",
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/playlist/{id}"
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/playlist/{id}")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/playlist/{id}")
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{
"playlistId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"type": "manual",
"thumbnailUrl": "<string>",
"videoCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"rules": [
{
"field": "tag",
"operator": "contains",
"value": "<string>",
"logic": "AND"
}
],
"videos": [
{
"videoId": "<string>",
"title": "<string>",
"preview": "<string>",
"length": 123,
"order": 123
}
]
}{
"message": "Forbidden"
}{
"message": "Not found"
}Authorizations
apiKeyAuthbearerAuth
API key created in the dashboard or via POST /v1/api/api-keys. Keys are prefixed pn_ and do not expire until revoked.
Path Parameters
Playlist ID
