O
O
Ockonal2017-03-13 13:41:44
In contact with
Ockonal, 2017-03-13 13:41:44

How to send a message on behalf of a VKontakte group?

Hello. You need to write a bot in the messages of the public page. In the settings of this very page, I allowed messages. Created a community token with rights to messages, made a callback api notification for new messages to the group.
Notifications come, in response to them I need to send a message:

https://api.vk.com/method/messages.send?message=Hello&user_id=USER&access_token=TOKEN&v=5.62

TOKEN - community token, which I wrote about above
USER - the user who just wrote to the page messages and I received it through the callback api
As a result:
"error_code":15,"error_msg":"Access denied: no access to call this method"

If we take a regular standalone token, then with its help I can easily send messages, but on behalf of the user who received the token (me, for example), but on behalf of the group.
It feels like these community messages received from the web interface do not work stupidly.

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