Good day!

Tell me, please, I can not figure out the messages of the community in the VC. The documentation on messages.send says that

You can not first write to the user on behalf of the community

In addition, this cannot be done in the web form for sending messages from the community.

But at the same time there are such community-bots (for example, Bot Maxim ), who write to you right after joining the group. How do they do it? How to set it up?

  • Well, in the web form, you use the access token owned by the current user, not the community. About the fact that it is impossible to write the first on behalf of the community - I did not find it on the page - chernomyrdin

2 answers 2

The bot, given by you as an example, in reality does not write first, if you just subscribe to the community.

Since last October, VKontakte allowed communities to be the first to write to the user . But not to everyone, but only to those who clearly expressed a desire to subscribe to community posts. This can be done in several ways.

  1. In the web interface, on the community page, in the Actions menu, select Allow posts.
    Action menu
  2. Run the messages.allowMessagesFromGroup API query.
  3. Using the widgets " Allow to write to the community " or " Community messages "
  4. If the user has already started a dialogue with the community, he will receive messages until he refuses it himself.

In the first three cases, the bot receives a message_allow event via the Callback API , in the latter, a message_new event.

Based on information from the official VKontakte community administration page .

    The second time I encountered the fact that I receive a message from a community in which I do not even enter and decided to look more closely at exactly how Coca-Cola Russia and Lees did it.

    In fact, the first message of the community is not as a message, but as a gift.

    By the way, for users there is also no restriction on gifts in the sense that they can be sent to anyone, even if you simply cannot write to this person.