Y
Y
yahabrovec2019-03-10 23:08:35
Python
yahabrovec, 2019-03-10 23:08:35

Vk api how to get messages from a conversation?

Got a question.
To receive new messages written by the bot, you need to use Vk LongPoll or Callback API. However, this does not apply to messages coming from a conversation in which the bot was added. For this, group.getLongPollServer and group.getLongPollHistory are used. Using the first method, I have to get data to connect to the longpoll server, but I get the error longpoll for this group is not enabled. I didn't find anything about this on the internet. Therefore, I concluded that I was going in the wrong direction. Tell me how can I still receive messages from a conversation in which a bot is added?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2019-03-11
@StockholmSyndrome

However, this does not apply to messages coming from a conversation in which the bot was added.

not true, you can receive messages from a conversation with LongPoll, only for this you need the bot to have access to all correspondence in the conversation
you need to enable LongPoll in the group settings
Management -> Settings -> Working with API -> Long Poll API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question