Duplicate Messages


I’m using the Sendbird chat API and using Bot Interface for bot feature of my chat application. But I’m getting duplicate messages from bot. The frequency of messages is not fixed sometimes I even get triple messages also and sometimes there is no issue. Can anyone help with this issue.

As per the documentation I’m returning HttpStatus.Ok from the callback url of the bot to avoid sendird to call the callback url mutilple times.

Hi there.

Your issue happens because you are not responding to the bot’s callback fast enough. Please respond right away with the 200 response. Then complete any async operations and post a message to the channel. The second and third calls are the bot’s retry logic doing as is expected. :slight_smile:

I’ve attached a blog post which explains more.


Thanks for your response. But I’m sending the response right away using @Asynch . But still getting duplicate messages. Our backend server is in India and the sendbird server is in Tokyo .
I even tried getting last message sent in channel by the bot and checking that before sending message to send bird to remove duplicates. But the problem is even the last message is not coming correct because sendbird is too fast to call my method.

So can you suggest if there is a way I can differentiate between duplicate messages by some header or some information.