Answer the question
In order to leave comments, you need to log in
How to organize access to VK messages in a web application?
Lately I've become interested in web programming, in particular Web.Py + Twitter Bootstrap + Heroku. And just the other day I came across the VK API, and decided to do something cool.
There is an idea, but operations with personal VK messages appear in it. The problem is that the API functions for working with LANs are designed only for standalone applications (why?!). You can, of course, “pretend to be” a regular application, but this requires a username / password. But I want to do everything beautifully and politely, through authorization using OAuth.
How, after all, is it correct to organize such access so that the user enters the login / password on api.vkontakte.ru/ ..., but the web application eventually receives an access_token designed for a desktop application?
Thank you.
Answer the question
In order to leave comments, you need to log in
It is possible, but you need to:
1. Create an application in your personal VKontakte account, get a key
2. Using the key, ID and application key, as well as information about your page ID, login password, get an Access Token
3. Request VKontakte methods that satisfy obtained access rights using Access Token
I have a class implementation in PHP for the VKontakte API 2.0: pastebin.com/5yyCjASu
You can use it.
I don't understand why standalone can't be done via OAuth? A year ago I wrote, everything was fine with that. No login-password is required, everything is the same through access_token.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question