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

execute.getMusicPage

Get audios and playlists for a specified user or community

Parameters:

NameValue
owner_idUser or community id
need_owner (optional)"1" — return information about user or community — first name, last name, photo..., "0" (default) — don't return
need_playlists (optional)"1" — return playlists, "0" (default) — don't return
playlists_count (optional)Maximum number of playlists to return
audio_offset (optional)Offset to skip that number of audios (default 0)
audio_count (optional)Maximum number of audios to return

Example (VK Official):

$owner_id = 358618411;
curl_setopt(
$ch, CURLOPT_URL, "https://api.vk.com/method/execute.getMusicPage"
);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"v=5.116&https=1&audio_offset=0&need_owner=0&owner_id=${owner_id}".
"&audio_count=100&playlists_count=12&lang=en&need_playlists=1".
"&access_token=".TOKEN
);
<?php
include __DIR__.'/../../autoloader.php';
use Vodka2\VKAudioToken\SupportedClients;
//Credentials obtained by example_vkofficial.php script
define('TOKEN', $argv[1]);
define('USER_AGENT', SupportedClients::VkOfficial()->getUserAgent());
$ch = curl_init();
curl_setopt($ch,CURLOPT_HTTPHEADER, array('User-Agent: '.USER_AGENT));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$owner_id = 358618411;
curl_setopt(
$ch, CURLOPT_URL, "https://api.vk.com/method/execute.getMusicPage"
);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"v=5.116&https=1&audio_offset=0&need_owner=0&owner_id=${owner_id}".
"&audio_count=100&playlists_count=12&lang=en&need_playlists=1".
"&access_token=".TOKEN
);
echo json_encode(json_decode(curl_exec($ch)), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n\n";