Overview
Adds a conversation for a specified user. For example, if a user selects a friend in search results without sending a message, use this API to add the conversation at the top of the conversation list. The new conversation is synchronized automatically across the user's clients.
Request
Authentication: Add authentication headers to the request. See Authentication.
Method:
POST
Rate limit:
100 requests/second
Endpoint: https://API domain/apigateway/convers/add
Content-Type:
application/json
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| user_id | string | Yes | ID of the user for whom the conversation is added. Maximum length: 32 characters. | |
| target_id | string | Yes | Conversation target ID. Maximum length: 32 characters. | |
| channel_type | int | Yes | Conversation type. |
Request Example
POST /apigateway/convers/add HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json
{
"user_id":"userid1",
"target_id":"userid2",
"channel_type":1
}
Response Example
{
"code":0,
"msg":"sucess"
}