Skip to main content

功能说明

在一个已创建的流式消息里面追加内容

请求说明

请求鉴权:接口需要增加验证 Header,请查看 鉴权说明

请求类型POST

请求限频100次/秒

请求地址:https://请求域名/apigateway/messages/private/stream/append

Content-Typeapplication/json

请求参数

参数数据类型是否必填参数说明
sender_idstring消息发送者id
target_idstring消息接收者id
msg_idstring流式消息的id
itemsarray流式分片列表
items.sub_seqint分片编号,从1开始递增。可以留空,让IM系统来维护编号
items.eventstring分片事件,msg:分片消息;complete:完成信号;
items.partial_contentstring分片json数据

请求示例

POST /apigateway/messages/private/stream/append HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json

{
"sender_id":"userid1",
"target_id":"userid2",
"msg_id":"xxxxxxxxx",
"items":[
{
"sub_seq":1,
"event":"msg",
"partial_content":"json格式的分片内容"
},{
"sub_seq":2,
"event":"msg",
"partial_content":"json格式的分片内容"
},{
"sub_seq":3,
"event":"complete"
}
]
}

响应参数

参数数据类型参数说明
msg_idstring消息的唯一标识

响应示例

{
"code":0,
"msg":"sucess"
}