Answer the question
In order to leave comments, you need to log in
Why can the photos.getAlbums method return {error: {error_code: 15, error_msg: "Access denied"}}?
Hello.
I just started to understand the javascript SDK. I'm trying to use the photos.getAlbums method.
I make the request like this:
VK.init({
apiId: *******,
scope: 4
});
var app = {
auth: {} // authorization result
}
VK.Auth.login(function(response) {
$.each(response, function (index, value) {
app.auth[index] = value;
});
});
VK.Api.call('photos.getAlbums', {owner_id: this.auth.session.user.id
function(r) {
alert(r);
});
Answer the question
In order to leave comments, you need to log in
The permission mask must be specified not in VK.init, but as the second parameter of VK.Auth.login like this:
VK.Auth.login(function(response) {
// ...
}, 4);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question