getting email from javascript API in VKontakte

2.2k views Asked by At

I currently working on the javascript SDK to implement VK Connect on my website.

Everything is working good except that I'm not able to get the user's email.

Here is the call I make :

VK.Auth.login(function(response) {
    console.info(response);
}, 4194304);

The number "4194304" is the bit maks of email as it mentionned here : https://vk.com/dev/permissions

In the response I didn't manage to receive the email. Moreover I didn't find a method that can return email in vk documentation.

Is everybody has already faced this problem?

Thanks a lot!

1

There are 1 answers

2
sobolevn On BEST ANSWER

It is possible to get email with OAuth token. It's complicated for some reason. https://vk.com/dev/auth_sites

Email auth permission code:

email (+4194304) User e-mail access. Available only for sites.

SO question: How to get email address from vk.api?

If you do understand russian: https://toster.ru/q/94065