V
V
Vladislav2020-03-02 13:42:24
PHP
Vladislav, 2020-03-02 13:42:24

How to get data about VK artists and music in 2020?

As I understand now, there is no method in the audio API.
How can you get data about music and artists now, are there any loopholes?
Interested in data about the chart, their places, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2020-03-03
@cr1gger

Krch, I intercepted the request through the sniffer, where the boom application sends.
And just sending the same request is not enough.
You need to send exactly the same headers, otherwise there will be an error or an empty array will be returned.
So I passed everything exactly like the boom. And got this working code:

$ch = curl_init('https://api.um-agency.com/feed/tracks/get?pass_key=bamboo5e4d9fcf47abb&block_type=3&offset=0&count=100');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        "Accept: application/json",                                             //
        "User-Agent: VK_Music/4.2.1 (Android 4.2.4749 8.1.0)",                  // Получение списка топ 100 чарта вк, маскируясь под Boom
        "Host: api.um-agency.com",                                              //
        "Accept-Encoding: utf-8",
        "Connection: Keep-Alive"
    ));
    $html = curl_exec($ch);
    curl_close($ch);
    $list_arr = json_decode($html);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question