Tell me how to add a bot to a conversation on VKontakte. A bot is written in python using vk_api and longpoll.
Answer 1, authority 100%
From the VK documentation: & gt; 1. Community To connect a chat bot, you can use any of your VKontakte community - a group, meeting or public page. Your bot must comply with the rules, you can learn more about them here. & gt; The first step is to indicate that a bot will work in your community. To do this, go to "Community Management" → "Messages" → "Bot Settings" and enable the "Bot Features" item. & gt; The community is the entry point for users who will communicate with your bot. It is worth making sure that it looks attractive and contains a description of your bot, otherwise its actions may come as a surprise to users. Remember to enable posts in your community (Community Management → Posts) when the bot is ready to use so you can write to it. & gt; So, if you have chosen a community, you can start setting up notifications. & gt; 1.1. Obtaining an access key You will need an access key to receive updates (in Long Poll), as well as to work with the API. & gt; Open the "Community Management" section ("Page Management" if you have a public page), select the "Working with API" tab and click "Create Access Key". & gt; Check the required access rights and confirm your choice. & gt; You can create several keys with different access rights. Keys cannot be placed publicly - having learned it, a third party can access the VK API on behalf of your community. If the key has been compromised, you must remove it from the list - after that it will become invalid. & gt; You can also get an access token using OAuth. Use the Authorization Code Flow authorization scheme. To add to conversations: & gt; 1.2. Adding bots to conversations For users to be able to add a bot to conversations, you must enable this feature in the settings. Go to "Community Management" → "Messages" → "Bot Settings" and check the box next to "Allow adding community to conversations". This will bring up the “Invite to Conversation” button in the community, opening a modal window with a list of conversations. & gt; The chat bot currently has three access levels: & gt; Mention only This level of access is granted immediately after adding to a conversation. A bot can: see all messages that concern him. These are mentions of the bot and replies to its messages. send messages to a conversation & gt; Access to all correspondence & gt; Any conversation administrator can issue it. A bot can: & gt; see all messages in a conversation & gt; send messages to a conversation & gt; Administrator & gt; Only the creator of the conversation can issue it. A bot can: & gt; see all messages in a conversation & gt; send messages to a conversation & gt; Get conversation object & gt; Get Conversation Participants & gt; Important note: to receive events from a conversation, the API version of the callback server must be at least 5.80.