Send
POST api/v1/message/send
Note: To send a message.
Header
Field | Type | Remarks |
---|---|---|
ApiKey | String | ApiKey acquired from the admin |
Authorization | String | Bearer ${unifiedAuthToken} , in which the unifiedAuthToken is returned by /api/v1/auth |
Request Parameters
Field | Type | Remarks |
---|---|---|
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
Field | Type | Remarks |
---|---|---|
code | String | the Return Code |
desc | String | the Return Message |
data | SendMessageResponse | the data |
The SendMessageResponse field consists of the following subfields:
Field | Type | Remarks |
---|---|---|
id | String | The unique id of the message |
channelUuid | String | the uuid of the group chat |
Response Body
Return Code
code | desc | Remarks |
---|---|---|
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