VK Audio API reference for VK Audio Token
Index
API Methods
General info
New API Methods

audio.getPlaylistById

Get information about playlist by id.

Parameters:

NameValue
owner_idId of the owner of the playlist
playlist_idPlaylist id
access_keyMay be needed, when owner_id starts with "-"

These fields are returned by audio.searchAlbums method and other methods that return playlists.

Example (Kate):

$ownerId = -1;
$albumId = 2;
$accessKey = "123";
curl_setopt(
$ch,
CURLOPT_URL,
"https://api.vk.com/method/audio.getPlaylistById?access_token=".TOKEN.
"&owner_id=$ownerId&playlist_id=$albumId&access_key=$accessKey&count=1&v=5.95"
);
<?php
include __DIR__.'/../../autoloader.php';
use Vodka2\VKAudioToken\SupportedClients;
//Token obtained by example_microg.php script
define('TOKEN', $argv[1]);
define('USER_AGENT', SupportedClients::Kate()->getUserAgent());
$ch = curl_init();
curl_setopt($ch,CURLOPT_HTTPHEADER, array('User-Agent: '.USER_AGENT));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$ownerId = -1;
$albumId = 2;
$accessKey = "123";
curl_setopt(
$ch,
CURLOPT_URL,
"https://api.vk.com/method/audio.getPlaylistById?access_token=".TOKEN.
"&owner_id=$ownerId&playlist_id=$albumId&access_key=$accessKey&count=1&v=5.95"
);
echo json_encode(json_decode(curl_exec($ch)), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n\n";