Skip to main content

Overview

Sends a streaming private message in multiple fragments.

Request

Authentication: Add authentication headers to the request. See Authentication.

Method POST

Rate limit 100 requests/second

Endpoint https://API domain/apigateway/messages/private/stream/send

Content-Type application/json

Request Parameters

ParameterData TypeRequiredDescription
msg_idstringNoLeave empty for the first request. For subsequent requests, use the msg_id returned by the first request. Maximum length: 20 characters.
sender_idstringYesMessage sender ID. Maximum length: 32 characters.
target_idstringYesMessage recipient ID. Maximum length: 32 characters.
partial_contentstringYesText content of the message fragment.
seqintYesMessage fragment sequence number.
is_finishedboolNoWhether this is the final fragment. Default: false.

Request Example

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

{
"msg_id":"xxxxxx", // leave empty for the first call; for subsequent calls, pass the msg_id returned when sending the first chunk
"sender_id":"userid1",
"target_id":"userid2",
"partial_content":"content 1",
"seq":1,
"is_finished":false
}

Response Parameters

ParameterData TypeDescription
msg_idstringUnique message identifier.

Response Example

{
"code":0,
"msg":"sucess",
"data":{
"msg_id":"xxxx",
"msg_time":1722212323123
}
}