S
S
Sergey2015-07-02 08:42:06
PHP
Sergey, 2015-07-02 08:42:06

How to implement server authorization of a site in VKontakte without a dialog box?

The task is as follows: you need to make a page on the site, which will later be executed by cron, which authorizes the user in VKontakte using the login and password in the script itself, i.e. without user input in a dialog box, as suggested by the Oauth 2.0 authorization protocol . Next, we will work with methods that require user authorization on the site.
How to do it?
I understand that the question has already been dealt with hundreds of times, but the articles I found did not give the right answer, so do not rush to throw bricks;)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
entermix, 2015-07-02
@entermix

How to do it?

No way, to work with API methods (if that's what you mean), you must go through Oauth authorization and get an access token

E
Evgeny Popov, 2015-07-02
@Kaaboeld

It is possible, but through a crutch. Open not a separate window, but a hidden iframe (via the target attribute) in which the page is processed and, depending on the incoming response (body or url content), there is a redirect in the iframe to the script (redirect_uri) located on your site. Since the final page opened in the iframe will be located on your server, security policies will not be violated when accessing both its content and from it (parent) - calling the js function to check authorization.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question