Answer the question
In order to leave comments, you need to log in
How to get a list of audio recordings through api vk?
You need to get a list of user's audio recordings through api vk on node js .
var VK = require('vksdk');
var vk = new VK({
'appId' : [id приложение],
'appSecret' : '[секретный ключ]'
});
vk.setSecureRequests(false);
vk.request('audio.get', {'user_id' : [мой id vk]}, function(_o) {
console.log(_o);
});
Answer the question
In order to leave comments, you need to log in
Read the documentation, everything is written there:
/**
* Request client methods
*/
// First you have to pass access_token from client side JS code
vk.setToken(access_token);
Maybe I'm doing something wrong, I tried to change and get data about groups
var VK = require('vksdk');
var vk = new VK({
'appId' : [id приложение],
'appSecret' : '[секретный ключ]'
});
vk.setToken([мой токен]);
vk.setSecureRequests(false);
vk.request('groups.get', {'user_id' : [мой id vk]}, function(_o) {
console.log(_o);
});
{ error:
{ error_code: 5,
error_msg: 'User authorization failed: no access_token passed.',
request_params: [ [Object], [Object], [Object], [Object], [Object] ] } }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question