php – Error Code 17: Validation required (VK API)


After receiving the code from VK, I receive an access_token .

After that, I try to get data from the user".$data-user_id."&access_token=token&fields=photo_50&v=5.68

But at this point, VK returns error # 17:

object(stdClass)#2 (1) {
object(stdClass)#18 (4) {
string(65) "Validation required: please open redirect_uri in browser 95232901"

string(69) ""

But, if I take public data that does not require a key, then everything is fine".$data-user_id."&fields=photo_50&v=5.68

In general, the error crashes when I try to take user data with an access key.

The following parameter is also passed in the error message: redirect_uri is a specially composed address that must be opened in a browser to pass the validation procedure.

But the problem is that when the user is thrown by the link in redirect_uri , he clicks the "confirm validation" button, and after that VK throws the user here

VK automatically checks the user through a JS script, and sends it to the final link:

And there is no back_url to my site , but I need to read the access_token and user_id . How to do this if VK has already sent the user to the verification page, and then to another address?


redirect_uri is the address to which the user will be returned after following this link and confirming. If successful, it will be returned to this link along with the code with which you can get the token. (The server must contact for the token)

Actually, all this is in the VK documentation with examples and transmitted parameters

Scroll to Top