Delivery receipt is a feature that indicates whether a message has successfully been delivered to all the intended recipients by Sendbird server. With the implementation of delivery receipt, Sendbird not only provides the timestamp of when each user has last read the messages in each channel, but also the timestamp of when each user has the message last delivered to each user in each channel.
Note: Delivery receipt is only applicable to group channels.
Delivery receipt provides the following benefits.
Most popular messaging apps, such as WhatsApp and Facebook Messenger, provide this feature. Users who have experienced them expect to see if the message they sent has been successfully delivered when using a new chat service. Delivery receipt is a feature in high demand that today’s users are accustomed to using.
Previously, a sender had no way of knowing whether their message was unread because the server is in the process of delivering or failed to deliver the message due to the unreliable internet connection, or simply because the recipients haven’t yet read the message. This feature enables users to become better-informed, thus improving the Sendbird user experience.
Delivery receipt works in a similar way to read receipt. The server stores the timestamp of the message last delivered as
delivered_ts. The timestamp is recorded per user, per channel.
The Chat API provides the mark all messages as delivered action to receive a delivery event from the recipient client. This method updates the database with
delivered_ts which indicates the delivery timestamp of the last message, if your Sendbird application has delivery receipt enabled.
If any of the following actions is called, they are all considered a delivery event to Sendbird server.
When the server receives a delivery event from a user, it updates the database with the user’s delivery receipt and stores the current server time as
delivered_ts to the database.
Note: The Chat API's send a message to a group channel action is also considered a delivery event for Sendbird server when it is called to send a message to a group channel.
Marks all messages in a group channel as delivered for a given user. This action is only applicable for users in a group channel.
The following table lists the parameters that this action supports.
Specifies the URL of the target channel.
The following table lists the properties of an HTTP request that this action supports.
Specifies the ID of the recipient to mark messages as delivered.
delivered_ts of the user is updated, the key
ts, which indicates the updated value of the user’s
delivered_ts, is included in the response in Unix milliseconds format.
GET API call that returns a group channel resource contains the
delivery_receipt property inside the resource. A user who has never made a delivery event isn’t included in the property. The property consists of the user ID and the timestamp of when the user last received the message in Unix milliseconds as shown below.