What's New
Cloud Contact Center Terminology Update
https://console.tim.qq.com/v4/desk_http_svc/send_stream_msg?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
Parameter | Description |
v4/desk_http_svc/send_stream_msg | Request API |
sdkappid | Assigned SDKAppID in the Chat console when creating an application |
identifier | |
usersig | Generated signature of the App administrator account. For specific operations, see Generate UserSig. |
random | Enter a random 32-bit unsigned integer. The value ranges from 0 to 4294967295. |
contenttype | The request format has a fixed value of json. |
{"SessionId": "fd8a2e30-54de-4e40-bcaf-02718409c5cf", //Identification ID of the session"Chunk": "Hello, " // Message content.}
"ActionStatus": "OK", "ErrorInfo": "", "ErrorCode": 0, "MsgKey": "124_1600045926_716f784b2bbd6ce9415027715" //Message identifier returned. This parameter needs to be transmitted in subsequent calls. }
{"SessionId": "fd8a2e30-54de-4e40-bcaf-02718409c5cf","Chunk": "this is ","MsgKey": "124_1600045926_716f784b2bbd6ce9415027715"}
{"SessionId": "fd8a2e30-54de-4e40-bcaf-02718409c5cf","Chunk": "Tencent Cloud.","MsgKey": "124_1600045926_716f784b2bbd6ce9415027715",Finish: 1 //This field is 1, indicating the end of streaming messages.}
Field | Type | Required | Description |
SessionId | String | Required | Conversation ID |
Chunk | String | Required | Message content |
MsgKey | String | Optional. | Not required for the first API call, but needs to be filled in starting from the second call. |
Finish | Integer | Optional. | When calling for the last time, this field is 1, indicating that the streaming output has stopped. |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0}
Field | Type | Description |
ErrorCode | Integer | Error Code: 0: success Non-zero: failure |
ErrorInfo | String | Error message. |
ActionStatus | String | Result of request processing |
MsgKey | String | Return the unique message identifier for subsequent text output. |
Error Code | Description |
20001 | Invalid request packet |
20002 | UserSig or A2 invalid |
20003 | The UserID of the sender or recipient is invalid or does not exist. Please check whether the UserID has been imported into IM. |
20004 | Network issue, please retry. |
20005 | Internal server error, please retry. |
20006 | Trigger the callback before sending a private chat message, and the App backend returns that the message cannot be delivered. |
90001 | JSON format parsing failed. Check whether the request package conforms to the JSON Specification. |
90002 | The MsgBody in the JSON format request packet does not match the message format description, or the MsgBody is not an Array type. See the definition of TIMMsgElement object. |
90005 | The JSON format request body lacks the MsgRandom field or the MsgRandom field is not of the Integer type. |
90007 | The MsgBody type in the JSON format request body is not an Array type. Change it to an Array type. |
90009 | Request requires App administrator permissions. |
90010 | The JSON format request packet does not match the message format description. See the definition of TIMMsgElement object. |
93000 | The JSON data packet is excessively long. The message body should not exceed 12k. |
141000 | Applications other than Desk are not allowed to call this API. |
141002 | Internal system error, please retry. |
141004 | Illegal request parameters, please check and retry. |
141005 | This session does not exist. |
141006 | Illegal SessionID |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan