Answer the question
In order to leave comments, you need to log in
Why is an error returned from the VK API?
Good day.
Today I became interested in this method -> https://vk.com/dev/wall.post
When sending a request to create a post, an error 27 comes. The error itself is "The community access key is invalid."
This is how I make a request to create a post.
if ($message == 'Пост') {
$i_parse = $vk->request('wall.post', ['access_token' => 'мой токен', 'owner_id' => '-184407589', 'message' => 'New post on group wall via API.console.']);
$i = json_encode($i_parse);
$vk->sendMessage($peer_id,"OK\n $i\n");
}
{"error":{"error_code":27,"error_msg":"Group authorization failed: method is unavailable with group auth.","request_params":[{"key":"method","value":"wall.post"},{"key":"oauth","value":"1"},{"key":"owner_id","value":"-184407589"},{"key":"message","value":"New post on group wall via API.console."},{"key":"v","value":"5.81"}]}}
Answer the question
In order to leave comments, you need to log in
method is unavailable with group auth
wall.post()
:from_group=1
to on behalf of the group.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question