Answer the question
In order to leave comments, you need to log in
How to get a VK token?
Hello, I am writing a nodeJS application and I need to get a user authorization token. He must click on the link on the page:
https://oauth.vk.com/authorize?client_id=000000&scope=groups,wall,offline,photos&redirect_uri=http://oauth.vk.com/blank.html&display=page&v=5.21&response_type=token
Answer the question
In order to leave comments, you need to log in
After authorization and transfer to the http://oauth.vk.com/blank.html
c token in the hash, you can only pull it out by being "above" the user's browser. A Web extension installed in the user's browser or your entire application on some Electron with a browser component will be able to receive such data. There is no way to do this in a regular browser: someone else's domain.
On the second question. Having a token, you can get the user id by calling the method users.get()
with this token: it will return the data of the user who issued the token.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question