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

execute.removeAudioFromPlaylist

Remove audios from playlist

Parameters:

NameValue
playlist_idId of the playlist
owner_idId of the owner of the playlist
audio_ids (optional)Comma separated list of audio ids — owner_id, audio_id, i.e. 123_456

Example (VK Official):

$owner_id = 123;
$playlist_id = 456;
$audio_ids = '123_5,123_6';
curl_setopt(
$ch, CURLOPT_URL, "https://api.vk.com/method/execute.removeAudioFromPlaylist"
);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"v=5.116&https=1&owner_id=${owner_id}&playlist_id=${playlist_id}&audio_ids=".urlencode($audio_ids).
"&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);
$owner_id = 123;
$playlist_id = 456;
$audio_ids = '123_5,123_6';
curl_setopt(
$ch, CURLOPT_URL, "https://api.vk.com/method/execute.removeAudioFromPlaylist"
);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"v=5.116&https=1&owner_id=${owner_id}&playlist_id=${playlist_id}&audio_ids=".urlencode($audio_ids).
"&lang=en&access_token=".TOKEN
);
echo json_encode(json_decode(curl_exec($ch)), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n\n";