Answer the question
In order to leave comments, you need to log in
How to get list of audio recordings using vk api?
You need to get a list of the user's audio recordings. As you know, in 2016 vk closed the open api for audio.
I tried to get a token pretending to be an android, substituting user-agent:
QNetworkRequest request;
request.setRawHeader(
QByteArray("User-Agent"),
QByteArray("VKAndroidApp/4.38-816 (Android 6.0; SDK 23; x86; Google Nexus 5X; ru")
);
request.setUrl(QUrl ("
https://oauth.vk.com/authorize?client_id=2274003&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=audio&response_type=token&v=5.95&state=1337
"));
ui->view = new QWebView;
ui->view->load(request, QNetworkAccessManager::UnknownOperation);
ui->view->show();
{"error":"invalid_access","error_description":"Security issue"}
https://api.vk.com/method/audio.get?uid=212306824&need_user=1&count=15&access_token=мойтокен&v=5.95
Answer the question
In order to leave comments, you need to log in
The fact is that I set the user agent for the request, and not for QWebView, so I had to create a QNetworkAccessManager and use manager->get (request) to get a response (I used the kate mobile token)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question