Answer the question
In order to leave comments, you need to log in
Why do I get the error "Access denied: no access to call this method" when I try to send a message via messages.send?
I'm trying to send a message using the messages.send method, but I get the error "Access denied: no access to call this method" (Error code - 15)
Although the received token implies the messages right
Code:
$request_params = array(
'message' => "test",
'user_id' => $user_id,
'access_token' => $token,
'random_id' => $random_id,
'v' => '5.101'
);
$get_params = http_build_query($request_params);
file_get_contents('https://api.vk.com/method/messages.send?'. $get_params);
file_get_contents("https://api.vk.com/method/messages.send?message=test&access_token=$token&v=5.80&user_id=$user_id&random_id=$random_id");
Answer the question
In order to leave comments, you need to log in
do you have standalone app?
If not, then messages cannot be sent.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question