Retrieve a list of message of UserChat with ID.
Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId}/messages and HTTP GET
This method does currently accept application/json only.
Parameter | Example | Required | Description | Parameter type |
|---|---|---|---|---|
userChatId | 5e65fa8bc2409f0c1fd3 | Required | ID of | Path |
since | eyJjaGF0S2V5IjoiZ3Jvn0= | Optional | Encoded key of the first message to be retrieved | Qeury |
limit | 25 | Optional | Restrict the maximum number of messages to be retrieved | Query |
sortOrder | desc(or asc) | Required | Order messages should be listed(descending order means latest message first) | Query |
GET https://api.channel.io/open/v5/user-chats/5e65fa8bc2409f0c1fd3/messages?limit=10
Returns messages along with related information.
The number of messages retrieved in this endpoint is restricted by the limit query parameter, and is capped to values in the closed interval [1, 500].
Pagination is supported through the since query parameter along with the next value contained in the root object of the JSON response. Successive queries to this endpoint using the previous next value as the since parameter will ultimately retrieve all messages in the chat.
If the since parameter is left empty, the list retrieved will start with the first message (as specified by the order parameter).