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
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| msg_id | string | No | Leave empty for the first request. For subsequent requests, use the msg_id returned by the first request. Maximum length: 20 characters. | |
| sender_id | string | Yes | Message sender ID. Maximum length: 32 characters. | |
| target_id | string | Yes | Message recipient ID. Maximum length: 32 characters. | |
| partial_content | string | Yes | Text content of the message fragment. | |
| seq | int | Yes | Message fragment sequence number. | |
| is_finished | bool | No | Whether 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
| Parameter | Data Type | Description | |
|---|---|---|---|
| msg_id | string | Unique message identifier. |
Response Example
{
"code":0,
"msg":"sucess",
"data":{
"msg_id":"xxxx",
"msg_time":1722212323123
}
}