N
N
newdancer2017-02-14 15:31:14
In contact with
newdancer, 2017-02-14 15:31:14

Why does the request validation fail in VK api?

Request validation fails in VK api? What's wrong?
I received a token from the link:

https://oauth.vk.com/authorize?client_id=тут id созданного standalone приложения&scope=groups,wall,offline,photos&redirect_uri=https://oauth.vk.com/blank.html&display=page&v=5.21&response_type=token

php request code from the server:
function sendVK($message) {
  $owner_id = 'тут id группы с минусом';
  $scope = 'groups,wall,offline,photos';
  
    $url = 'https://api.vk.com/method/wall.post';
    $params = array(
        'owner_id' => $owner_id,
    'from_group' => '1',
        'message' => $message,
        'access_token' => 'тут токен полученный по ссылке выше',
        'v' => '5.62',
    );
  echo "".$result;
}

$message = "HEllo!";
sendVK($message);

when called, it gives error code 17, which means:
User validation is required.
The action requires confirmation - you need to redirect the user to the service page for validation.
And it is necessary to publish from the script to the group

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question