Пытаюсь реализовать загрузку mp3 в Аудио записи средствами api.
Столкнулся с проблемой:
stdClass Object
(
[error] => stdClass Object
(
[error_code] => 15
[error_msg] => Access denied: filename is incorrect
[request_params] => Array
(
[0] => stdClass Object
(
[key] => oauth
[value] => 1
)
[1] => stdClass Object
(
[key] => method
[value] => audio.save
)
[2] => stdClass Object
(
[key] => server
[value] => 613723
)
[3] => stdClass Object
(
[key] => audio
[value] => %7B%22audio%22%3A%228c56194583%22%2C%22time%22%3A1%2C%22artist%22%3A%22%22%2C%22title%22%3A%22%22%2C%22genre%22%3A0%2C%22album%22%3A%22%22%2C%22bitrate%22%3A81%2C%22bitrate_mode%22%3A%22vbr%22%2C%22md5%22%3A%222acbe35fe4cb004fc709e58df6a9f849%22%2C%22kad%22%3A%2200255aa9fffe9a47ffe6f8aaefa8aaa8%22%2C%22vkaf_gen_data%22%3A%7B%22key%22%3A%22fp240914674_8c56194583%22%2C%22res%22%3A%7B%22result%22%3Atrue%2C%22_%22%3A%22_%22%7D%2C%22err%22%3A%5B%5D%7D%7D
)
[4] => stdClass Object
(
[key] => hash
[value] => ffaa4b5bdb7511dce21739fffcb4aaca
)
[5] => stdClass Object
(
[key] => artist
[value] => Васян
)
[6] => stdClass Object
(
[key] => title
[value] => test
)
)
)
)
Вот код:
$request_params = array(
'access_token' => $token_user,
'server' => $answer->server,
'audio' => $answer->audio,
'hash' => $answer->hash,
'artist' => 'Васян',
'title' => "test"
);
$get_params = http_build_query($request_params);
$q = file_get_contents('https://api.vk.com/method/audio.save?' . $get_params);
$q = json_decode($q);
print_r($q);
Само собой выполняю после запроса на
audio.getUploadServer
, загрузка проходит штатно без ошибок, а при попытке сохранить
audio.save
- выдает ошибку.
[error_code] => 15
[error_msg] => Access denied: filename is incorrect