How do I delete all messages from a specific user in a group channel?

I attempted to delete all of a user’s messages by following the process below:

  1. Retrieve the list of all messages in a channel
  2. Filter by user ID to obtain a list of message IDs
  3. Repeatedly call the delete API

However, starting with step 1, it didn’t work properly. For example, suppose there are 400 messages. I tried to fetch 200 messages at a time using the next limit, but the pagination did not work.

Please provide a solution.

Hi @mooon,

Welcome to Sendbird Community — thanks for contributing!

Could you let me know which development platform (i.e. Android/iOS/Javascript) are you using for this?