# Duplicate Messages

**URL:** <https://community.sendbird.com/t/duplicate-messages/1739>\
**Category:** Sendbird Chat API/SDK\
**Tags:** group-channel, push-notification, chatsdk\
**Created:** [February 23, 2021, 12:22am UTC](https://community.sendbird.com/t/duplicate-messages/1739 "2021-02-23T00:22:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janhavi\_Puniani](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/janhavi_puniani/32/971_2.png) [@Janhavi\_Puniani](https://community.sendbird.com/u/Janhavi_Puniani)\
**Post date:** [February 23, 2021, 12:22am UTC](https://community.sendbird.com/t/duplicate-messages/1739/1 "2021-02-23T00:22:14Z")

</div>

Hi,

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.

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [February 23, 2021, 1:18am UTC](https://community.sendbird.com/t/duplicate-messages/1739/2 "2021-02-23T01:18:40Z")

</div>

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. 🙂

I’ve attached a blog post which explains more.

> **[Bot interface and pong bot implementation - Sendbird](https://sendbird.com/blog/bot-interface-and-pong-bot-implementation)**
>
> A guide to connect any chatbot to your messaging app. Sendbird is a chat framework and API that powers chat and messaging for businesses of all sizes.

---

<div class="post-metadata">

**Author:** ![Janhavi\_Puniani](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/janhavi_puniani/32/971_2.png) [@Janhavi\_Puniani](https://community.sendbird.com/u/Janhavi_Puniani)\
**Post date:** [February 27, 2021, 5:33am UTC](https://community.sendbird.com/t/duplicate-messages/1739/3 "2021-02-27T05:33:26Z")

</div>

Hi,

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.

---

<div class="post-metadata">

**Author:** ![Deepak\_Gupta](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/deepak_gupta/32/2968_2.png) [@Deepak\_Gupta](https://community.sendbird.com/u/Deepak_Gupta)\
**Post date:** [September 15, 2022, 7:35pm UTC](https://community.sendbird.com/t/duplicate-messages/1739/4 "2022-09-15T19:35:53Z")

</div>

@Janhavi_Puniani did you able to resolve the duplicate message issue ? I am also facing the same using the react js sample app

> <https://github.com/sendbird/sendbird-chat-sample-react/issues/115>
>
> while chating on channel group it is showing unnecessary multiple message in cha…t ,
> here in these picture you can see i have send single message but it is appearing twice to reciever and sometime more than that
> !\[Screenshot from 2022-08-19 17-02-18\](https://user-images.githubusercontent.com/94990909/185609609-8ff22c85-700d-4d34-8d5b-fcfef69716d3.png)
> !\[Screenshot from 2022-08-19 17-02-54\](https://user-images.githubusercontent.com/94990909/185609631-6de9177b-6839-4619-b1a2-3d51c6466d03.png)

Could you please help here
