S
S
Sergey Vasenin2017-08-31 19:20:38
In contact with
Sergey Vasenin, 2017-08-31 19:20:38

How to send messages to all subscribers of a VK group?

is there any ready-made code that implements sending a message to all subscribers of the group

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Serezha, 2017-08-31
@emin313

some code ready

No. There is only a community application - https://vk.com/app5748831
Implementation for yourself:
First, we collect a list of user ids who have allowed receiving messages from the community.
For example, using https://vk.com/dev/callback_api or https://vk.com/dev/messages.getDialogs
Next, we split the id list into an array of arrays of 100 id each, loop through the array and use the https://vk method .com/dev/messages.send pointing to 100 user_ids.
At the same time, remember that we can only request a method 3 times per second. https://vk.com/dev/execute will help to remove the restriction - we will be able to send 100*25*3 = 7500 messages per second (actually slower).

I
ILoveYAnny, 2018-03-15
@ILoveYAnny

The native VK application for mailings (more precisely, third-party development, but connected via the native group management interface) has its own API - https://vk.com/page-58810575_54614990. There you can pass the ID of the list of subscribers and message + attach, the rest of the application will do for you, and take care of the limits and proper execution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question