A
A
Artem00712017-04-24 00:08:30
PHP
Artem0071, 2017-04-24 00:08:30

How to set an entry in a VK group via api?

I ask a request

$data = array(
    'owner_id' => $app_id,
    'from_group' => '1',
    'message' => 'it is a test',
    'signed' => '0',
    'access_token' => $token
);

$params = http_build_query($data);

echo "<a href='https://api.vk.com/method/wall.post?{$params}'>POST</a>";

In response, I get error 15:
Access denied: no access to call this method
The manual says:

This access right is not available by default for sites using OAuth authentication (ignored when trying to authorize)

That is, there is not a single chance to expose the site through the site?
PS. I'm trying to post a post that I added on the site to the wall in VK
(plain text)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2017-04-24
@Artem0071

When receiving a token, a redirect must be done to https://oauth.vk.com/blank.html. Otherwise, the token will not receive the necessary rights.

U
Uno, 2017-04-24
@Noizefan

The token does not have sufficient rights for this method.
Create a Standalone application, get a community administrator access_token with the necessary rights (groups, wall) and do whatever you like with it)
or the problem is in the owner_id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question