Is it possible to delete message after some time automatically?


I’d like to implement a feature with chat sdk where a user’s message only lasts for few minutes or so in a channel.
Is there an option in Sendbird?
I was thinking of having own timer and force calling deleteMessage, but this doesn’t seem neat so looking if Sendbird supports this.


Sendbird supports an ephemeral open channel. Messages in an ephemeral open channel aren’t saved in Sendbird’s database. This means that old messages pushed out by new ones can’t be retrieved as they are one-time data.

So you don’t need to delete messages manually but you can’t control the time you want them to exist.


@Brian_Sang Thank you for your answer.
However I don’t think that’s the usecase I want.

I see messageSurvivalSeconds in GroupChannelCreateParams and BaseMessage class. Do you have any link to what this is?
Maybe this is what I was looking for.

There’s a message_retention_hours property in application settings. This is the length of time in hours that the messages are retained. (Default: 4380) You can change this value but this isn’t for managing messages’ lifetime in minutes.