https://xxxxxx/v4/openim_robot_http_svc/send_stream_msg?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
参数 | 说明 |
xxxxxx | SDKAppID 所在国家/地区对应的专属域名: 中国: console.tim.qq.com新加坡: adminapisgp.im.qcloud.com首尔: adminapikr.im.qcloud.com东京: adminapijpn.im.qcloud.com法兰克福: adminapiger.im.qcloud.com硅谷: adminapiusa.im.qcloud.com雅加达: adminapiidn.im.qcloud.com |
v4/openim_robot_http_svc/send_stream_msg | 请求接口。 |
sdkappid | 创建应用时即时通信 IM 控制台分配的 SDKAppID。 |
identifier | |
usersig | |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295。 |
contenttype | 请求格式固定值为 json。 |
{"From_Account": "@RBT#my_bot","To_Account": "user01","Chunk": "hello, "}
{"From_Account": "@RBT#my_bot","To_Account": "user01","Chunk": "world","MsgKey": "606781340_3986845397_1706000918","Finish": 1}
字段 | 类型 | 属性 | 说明 |
From_Account | String | 必填 | 消息发送方 UserID(用于指定发送消息方账号)。 |
To_Account | String | 必填 | 消息接收方 UserID。 |
Chunk | String | 必填 | 流式文本消息其中的某一段文字。 |
MsgKey | String | 选填 | 首次调用 API 时不填,从第二次调用开始需要将该字段回传。 |
Finish | Integer | 选填 | 最后一次调用时,标识该流式输出已经结束。 |
{"ActionStatus":"OK","ErrorInfo":"","ErrorCode":0,"MsgKey":"606781340_3986845397_1706000918"}
字段 | 类型 | 说明 |
ActionStatus | String | 请求处理的结果: OK:表示处理成功。 FAIL:表示失败。 |
ErrorCode | Integer | 错误码: 0:表示成功。 非0:表示失败。 |
ErrorInfo | String | 错误信息。 |
MsgKey | String | IM 后台返回的消息唯一标识,用于后续文本输出。 |
错误码 | 描述 |
10002 | 系统内部错误,请重试。 |
10004 | 参数有误,请检查请求参数。 |
文档反馈