Overview
When trusted-device verification is enabled, only bound trusted devices can connect and sign in. Use this API to add a trusted device for a specified user.
This feature is supported only on mobile and desktop clients. It is not supported on Web clients because they do not have a device ID. When trusted-device verification is enabled, we recommend banning Web clients.
API Reference
- Method
POST - Path
/apigateway/binddevices/add
Request
Authentication: This API validates request headers. See Authentication.
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| user_id | string | Yes | User ID. Maximum length: 32 characters. | |
| device_id | string | Yes | Device ID. Maximum length: 100 characters. | |
| platform | string | No | Platform identifier, such as iOS, Android, or Web. Maximum length: 20 characters. | |
| device_company | string | No | Device manufacturer. Maximum length: 45 characters. | |
| device_model | string | No | Device model. Maximum length: 45 characters. |
Request Example
POST /apigateway/binddevices/add HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json
{
"user_id": "u_1001",
"device_id": "device_001",
"platform": "iOS",
"device_company": "Apple",
"device_model": "iPhone 15"
}
Response Example
{
"code": 0
}