S
S
Sergey Gladyshev2017-10-21 16:12:21
PHP
Sergey Gladyshev, 2017-10-21 16:12:21

How to get rid of Application authorization failed: method is unavailable with service token. with users.search?

Good day.
I am trying to execute the code

require_once 'vendor/autoload.php';

$vk = getjump\Vk\Core::getInstance()->apiVersion('5.5')->setToken(VK_SERVICE_KEY);


$data = $vk->request('users.search', ['count' => 200]);

$data->each(function($key, $value){
    Debug($value);
});

squabbles with error
Fatal error: Uncaught exception 'getjump\Vk\Exception\Error' with message 'Application authorization failed: method is unavailable with service token.' in

I work with the VK API through the library https://github.com/getjump/VkApiPHP
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serezha, 2017-10-21
@Resident234

The error says that you are doing something wrong - you are using a method that is not available with the service key, while using the service key.
"This method can be called with the user's access key."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question