https://xxxxxx/v4/live_engine_http_srv/send_text_msg?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
Parameter | Description |
xxxxxx | SDKAppID's dedicated domain name where it is located: China: console.tim.qq.comSingapore: adminapisgp.im.qcloud.comUnited States: adminapiusa.im.qcloud.com |
v4/live_engine_http_srv/send_text_msg | Request API |
sdkappid | The SDKAppID assigned by the Chat console when creating an application can be obtained from the application card in the Console of Chat. |
identifier | Must be an application admin account. For more details, see the documentation Application Administrator. |
usersig | The signature generated by the application admin account. For specific operations, see Generate UserSig. |
random | Enter a random 32-bit unsigned integer, value ranges from 0 to 4294967295. |
contenttype | Request format, the value is fixed as json. |
{"RoomId":"room1","Sender_Account":"user1","TextContent":"msg", // message context"ExtensionInfo" :"{\\"data\\":1,\\"value\\":2}" // Optional field; it must be in JSON format}
Field | Type | Attribute | Description |
RoomId | String | Required | Room ID. |
Sender_Account | String | Required | Message sender. |
TextContent | String | Required | Message text content. |
ExtensionInfo | String | Optional | Custom message data. It is saved in the cloud and will be sent to the receiver. Such data can be pulled after the app is uninstalled and reinstalled. |
MsgBody corresponds to the text message format, and it also contains custom message data CloudCustomizaData.The packaged request information is as follows:MsgBody follows the text message format and includes the CloudCustomData field for custom message data. The structure of the wrapped request is as follows:{"CloudCustomData" : "{\\"data\\":1,\\"value\\":2}","MsgBody" : [{"MsgContent" : {"Text" : "msg"},"MsgType" : "TIMTextElem"}],}
CloudCustomData: Corresponds to the ExtensionInfo field in the original request.Text: Corresponds to the text content of the sent message.{"ErrorCode": 0,"ErrorInfo": "","ActionStatus": "OK","RequestId": "Id-ec3xxxxxxxxxxxxxxxxxxxxxxxxed-O-Seq-2433650","Response": {"MsgTime": 1750074420,"MsgSeq": 25,"MsgDropReason" : "MsgFreqCtrl"}}
Field | Type | Description |
ActionStatus | String | Request processing result. OK: processing successful. FAIL: processing failed. |
ErrorCode | Integer | Error Code. 0: success. Non-zero: Indicates Failure. |
ErrorInfo | String | Error message. |
RequestId | String | Unique request ID, returned for each request. To locate a problem, the RequestId of the request should be provided. |
MsgTime | Integer | Message sending timestamp, corresponding to the backend server time. |
MsgSeq | Integer | Message sequence number, the unique identifier of a message. |
MsgDropReason | String | Reason for discarding the message. It is empty by default. Currently, only messages that exceed the frequency limit are discarded. |
Error Code | Description |
100001 | Server internal error, please try again. |
100002 | Invalid parameter. Check whether the request is correct according to the error description. |
100004 | The room does not exist, possibly because it was never created or has already been dissolved |
100006 | Indicates that this room is not a live room and does not have permission to use live query interfaces |
100601 | The message cannot be sent due to muting. Check whether the sender is muted. |
100602 | The frequency limit for message sending is reached. Try again later. |
100603 | The message content is too long. Currently, the maximum message length supported is 12 KB. Please adjust the message length. |
Feedback