List
GET api/v1/message/list
Note: To query the list of messages inside a group. It is sorted by reverse order according to timestamps of the messages. Only current group members have access.
Header
Authorization
String
Bearer ${unifiedAuthToken} , in which the unifiedAuthToken is returned by /api/v1/auth
Request Parameters
channelUuid
String
Optional. It stand for the group chat's UUID. "toRelationId" and channelUuid should at least have one non-null value.
toRelationId
String
Optional. It stand for the receiver's relationId. "toRelationId" and channelUuid should at least have one non-null value.
maxCreateAt
Long
timestamp(ms). It must bigger than or equal to the last message sent in this page.
limit
int
How much data should be returned per page
Request Example
Response Parameters
code
String
the Return Code
desc
String
the Return Message
data
Array[MessageInfo]
the data
The MessageInfo field consists of the following subfields:
id
String
The unique id of the message
sendUuid
String
The uuid of the message. It is generated and managed by the client.
channelUuid
String
the uuid of the group chat
createAt
String
timestamp of the message (ms)
type
String
message type
from
String
sender' relationId
fromName
String
sender's name
fromAvatar
String
sender's avatar
content
String
message content
quote
MessageInfo
the quoted message
Response Body
Return Code
0
success
the flag for a successful request
10112
parameter error
ChannelUuid and toRelationId cannot be null at the same time.
10120
permission denied
You don't have access.
Last updated