V
V
Vampre2018-08-25 14:37:56
Django
Vampre, 2018-08-25 14:37:56

How to send PM to VK using a bot?

Enlighten please about sending PM bot to VK. The VK API documentation has a widget for allowing messages to be sent, but can't I send messages without permission using the sendMessage() method? Website in Django.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ariurn, 2018-08-26
@Vampre

No you can not.
According to the API documentation:
That is, the bot sends messages on behalf of the community. Quote from here :

Correspondence with the community can only be initiated by the user himself. It will not work to write on behalf of the group to people who have not corresponded with him. However, once a conversation has been initiated, the community will be able to send messages with no time or number limits. This will continue until the user forbids the community to write to himself.
The user can initiate a chat:
  • by sending a message to the community from the community page;
  • using the "Allow Posts" button on the community page;
  • by sending a message to the community using the "Community Messages" widget located on the community site;
  • Allowing them to send private messages using the "Allow Community to Post" widget or the VK API method in a third-party app (you don't need to send a message for this).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question