Overview
Disconnect a user who is connected to the IM service. You can target connections by platform, device, or user. This API affects only current connections and does not prevent the user from reconnecting. For example, after a user signs in on a new device, that device can disconnect the user's other devices.
Request
Authentication: Add authentication headers to the request. See Authentication.
Method:
POST
Rate limit:
100 requests/second
Endpoint: https://API domain/apigateway/users/kick
Content-Type:
application/json
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| user_id | string | Yes | ID of the user to disconnect. Maximum length: 32 characters. | |
| platforms | array | No | Device platforms to disconnect. If omitted, the user is disconnected from all platforms. | |
| device_ids | array | No | Unique IDs of the devices to disconnect. Each device ID can contain up to 256 characters. | |
| ext | string | No | Additional information returned to the business layer by the SDK when the user receives the disconnection notification. This field can be used for custom notifications. |
Request Example
POST /apigateway/users/kick HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json
{
"user_id":"userid1",
"platforms":["iOS","Android"],
"device_ids":["xxxxx","yyyyy"]
}
Response Example
{
"code":0,
"message":"success"
}