By default, RC does not save your message history, but we provide options to do so.
For mobile clients
You can retrieve history messages from the local database, from the server, or from both.
To retrieve history messages from the server, you need to enable Cloud Storage for One-to-One and Group Messages or Cloud Storage for Chatroom Messages. You can enable these services on the Chat pricing plans page in the Console.
For the server
There are two ways to retrieve message history from the server:
Option 1: Download message history logs
You can enable Server API message history download on the Basic Features page in the Console. This allows you to use the Server API to get a download URL for your app’s message history logs.
Notes:
-
Message history logs are packaged hourly. You can only retrieve data on an hourly basis.
-
The log files are stored on the server for only 3 days and are automatically deleted afterward.
-
The server starts saving message logs only after you enable this feature.
-
There is a delay in data retrieval. It takes about an hour after the data is compressed and packaged before you can download the message package from the previous hour.
-
For more details, see the documentation: Retrieve Historical Message Logs.
Option 2: Post-messaging callback
You can enable the Post-messaging callback service on the Chat pricing plans page, under the General services tab. We will then sync all message data to your specified app server, where you can store it yourself.
Notes:
-
When enabling this service, make sure to configure a valid and accessible callback URL.
-
If your server’s response to a callback request times out (5 seconds), our server will retry twice. If it still fails, the status for that message will not be synced.
-
For more details on limitations and other considerations, see the documentation: Post-messaging Callback.
If you have any questions, feel free to submit a ticket to us.