Answer the question
In order to leave comments, you need to log in
How to pass captcha in execute VK API request?
Hello. Please help, I have the following query:
function getAudio(now) {
var query = tracks[now].artist + " " + tracks[now].name;
var code = 'var res = '
+ 'API.audio.search({ "q": "'+query+'", "captcha_sid": 543689123460, "captcha_key": "qdzsx"});'
+ 'return res;';
VK.Api.call("execute", {code: code}, function(data) {
if (data.response) {
if ( now <= tracks.length() ) {
setTimeout(function() { getAudio(++now); }, 333);
} else {
console.log('Все обработано!!! Ура!');
}
}
});
}
Answer the question
In order to leave comments, you need to log in
In short, VK support answered that everything should work. When I get back to finalizing the application, I will check it again in more detail.
Maybe the response with the error code does not come inside the execute method, but directly to your data variable? And it is necessary to call the "execute" method with the parameters "code", "captcha_sid" and "captcha_key"? It would be nice to sort this out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question