Send
POST api/v1/message/send
Note: To send a message.
Header
ApiKey
String
Authorization
String
Bearer ${unifiedAuthToken} , in which the unifiedAuthToken is returned by /api/v1/auth
Request Parameters
channelUuid
String
Optional. It is the UUID of the group chat. It and channelUuid should at least have one non-null value.
toRelationId
String
Optional. It is the receiver's relationId. It and channelUuid should at least have one non-null value.
type
String
the type of the message. There are 3 default types: text;sys;card. Users can expand them on their own.
content
String
the content of the message
sendUuid
String
The uuid of the message. It is generated and managed by the client.
Request Example
Response Parameters
code
String
the Return Code
desc
String
the Return Message
data
SendMessageResponse
the data
The SendMessageResponse field consists of the following subfields:
id
String
The unique id of the message
channelUuid
String
the uuid of the group chat
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.
13301
block stranger messages
The receiver forbids chatting with with strangers.
13108
Not the member of this channel
Not a group chat member. You cannot send a message.
Last updated