Chat history
To retreive the user's all chats in a conversation you can use the below API.
info
{api-base-url}
can be obtained from the MirrorFly console.
#
HTTP request#
Request ParamsParam | DataType | Required | Description |
---|---|---|---|
chatType | String | Yes | Chat type. Possible values are singlechat, groupchat |
participant | String | Yes | Participant userid or groupid of chat if chatType is groupchat |
page | Number | No | Page number to get the particular page data default value is 1 |
size | Number | No | Number of chats per page default value is 10 |
messageId | String | No | Message id of the message to get paginated data (includes given messageId) |
direction | String | No | Direction of paginated data if messageId provided. Possible values are forward, backward default value is forward |
topicId | String | No | TopicId to filter the records |
Note : If it is a media message, use the
fileUrl
from the media object to download the media by using this Download Media API. Topics can be created from here Create Topic.
#
ResponsesIf successful, this action returns chats list in a conversation, in the response body.
#
ErrorIn the case of an error, an error object like below is returned.
When the token passed in Headers is expired
In the case of a Bad Request, an error message is returned