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

catalog.getAudioArtist

Get artist page

Parameters:

NameValue
artist_idArtist id
need_blocks (optional)0 — return only section names and ids, 1 — return blocks

Artist ids can be either numbers or strings. Numeric ids are returned in the id field, for example, by catalog.getAudioSearch method in the main_artists field. String id is the last part of an url similar to https://vk.com/artist/whitetown, id is "whitetown" in this example.

Example (VK Official):

$artist_id = 'whitetown';
curl_setopt(
$ch, CURLOPT_URL, "https://api.vk.com/method/catalog.getAudioArtist"
);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"v=5.116&https=1&need_blocks=1&artist_id=".urlencode($artist_id)."&lang=en&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);
$artist_id = 'whitetown';
curl_setopt(
$ch, CURLOPT_URL, "https://api.vk.com/method/catalog.getAudioArtist"
);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"v=5.116&https=1&need_blocks=1&artist_id=".urlencode($artist_id)."&lang=en&access_token=".TOKEN
);
echo json_encode(json_decode(curl_exec($ch)), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n\n";