Skip to main content

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

ParameterData TypeRequiredDescription
user_idstringYesUser ID. Maximum length: 32 characters.
device_idstringYesDevice ID. Maximum length: 100 characters.
platformstringNoPlatform identifier, such as iOS, Android, or Web. Maximum length: 20 characters.
device_companystringNoDevice manufacturer. Maximum length: 45 characters.
device_modelstringNoDevice 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
}