get https://apps.applozic.com/rest/ws/message/v2/list
Use this API to get the messsages
Description:
- If no user id or group id is passed to the API then this API returns the latest message of the calling user with each user or group which the user has chat with.
- If the user id is passed then API return the messages between the calling user and specified user.
- If the group id is passed the API returns the messages of the specified group.
Request Parameter Description:
Parameter | Required | Default | Description |
---|---|---|---|
userId | No | User Id of the user whose respective chat messages user want to fetch. | |
groupId | No | Group Id of the group for which messages need to be fetched. | |
startIndex | Yes | 0 | Starting Index to fetch messages from the list. |
mainPageSize | Yes | Number of user's chat thread to load while launching/initialize chat. | |
pageSize | Yes | 50 | It will fetch the number of messages in a single chat thread. |
endTime | No | Pass the oldest time from the fetched messages to load older messages |
Application Bot
- In case of Application Bot calling the API, Of-User-Id header is required. Of-User-Id is the userId of the user on behalf of which application bot wants to get the message list.
- To load more older messages in list pass endTime parameter with oldest message time received in messages list.
In Case of Error :
Response | Description |
---|---|
error | In case of any exception or error contact [email protected] |