N
N
NoXXik2020-03-08 14:09:35
Python
NoXXik, 2020-03-08 14:09:35

How to make a bot in VK through the VK API that will send messages?

I want to make a bot to which users will subscribe from the Start or / start button, the bot must find out the user's id, then the bot must find out in which group the user is studying in order to know what schedule he needs to send, I will store the list of id and schedule for each group at home, when the schedule comes out, the bot should send a message with the schedule of the user group throughout the list, and so every day. Because I am using Api vk and api in general for the first time, I have the following questions:

What is the best way to do it: Make the page a separate one, which will be the bot, or is it better through the community in which the application will be?

How to get permission to send messages? (I read the documentation and it’s all a mess, several types of obtaining an access token (what type do I need exactly?), how to find out the id of the user who started the dialogue with the bot?

Give any useful advice or an answer that will give a concept work vk api

Thank you all in advance)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2020-03-08
@NoXXik

1. It doesn't make much sense to create a bot in a separate community.
2. access token for bots is obtained in the settings of the "Working with API >> access keys" group.
3. In the message object, when the user sends a message for the first time, there is also his id.
4. Here are some examples of working with the vk_api library https://github.com/python273/vk_api/tree/master/ex...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question