Answer the question
In order to leave comments, you need to log in
How to delete messages in a VK conversation through the VK API?
What api method in VK erases all conversation messages on behalf of the conversation admin for all users? That is, no one should see the old messages
Answer the question
In order to leave comments, you need to log in
there is no such method, but we do not despair and do this:
using messages.getHistory and execute we get all the messages of the conversation at 5000 per request, the
code for execute will be something like this (it is better to minify for speed):
var peer_id = 2000000001; // идентификатор беседы
var results = [];
var i = 0;
var offset = 0;
while (i < 25) {
results.push(API.messages.getHistory({peer_id: peer_id, count: 200, offset: offset}));
i = i + 1;
offset = offset + 200;
}
return [email protected];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question