Skip to content

Pure Bluetooth Device Binding

API Address:/v2/binding/enduserapi/deviceBindingByPureBt

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

API Description:Pure Bluetooth device binding

Request Example:

javascript
{
  "bindingCode": "",
  "capabilitiesBitmask": 0,
  "deviceName": "",
  "dk": "",
  "encryptedBindingCode": "",
  "encryptedNewBindingSecret": "",
  "encryptedOldBindingSecret": "",
  "fid": "",
  "frid": "",
  "isCommonDevice": true,
  "pk": "",
  "pwd": "",
  "random": "",
  "signature": ""
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
paramparambodytrueBindDevicePureBtParamBindDevicePureBtParam
  bindingCodebindingCode, choose one between this and encryptedBindingCodefalsestring
  capabilitiesBitmaskDevice network capabilities:
1-WAN
2-LAN(WiFi)
3-LAN(WiFi)+WAN
4-BLE
5-WAN+BLE
6-LAN(WiFi)+BLE
7-WAN+LAN(WiFi)+BLE
8-Matter
9-WAN+Matter
10-LAN(WiFi)+Matter
11-LAN(WiFi)+WAN+Matter
12-BLE+Matter
13-WAN+BLE+Matter
14-LAN(WiFi)+BLE+Matter
15-WAN+LAN(WiFi)+BLE+Matter
falseinteger(int32)
  deviceNameDevice namefalsestring
  dkDevice Keytruestring
  encryptedBindingCodeEncrypted bindingCode, choose one between this and bindingCode
Algorithm: BASE64_ENCODE(AES_128_CBC(PKCS5Padding(bindingcode), key=PS, iv=random))
falsestring
  encryptedNewBindingSecretNew encrypted bindingSecret
Algorithm: BASE64_ENCODE(AES_128_CBC(PKCS5Padding(PK,DK,bindingSecret), key=PS, iv=random)), PKCS5Padding content includes English comma ","
truestring
  encryptedOldBindingSecretOld encrypted bindingSecret
Algorithm: BASE64_ENCODE(AES_128_CBC(PKCS5Padding(PK,DK,bindingSecret), key=PS, iv=random)), PKCS5Padding content includes English comma ","
falsestring
  fidFamily IDfalsestring
  fridRoom IDfalsestring
  isCommonDeviceIn home mode, whether to add to common device list (added by default)falseboolean
  pkProduct Keytruestring
  pwdpwdfalsestring
  randomrandomtruestring
  signatureSignature
Algorithm: SHA256(pk+dk+bindingCode+pwd+userDomainSecret)
If encryptedBindingCode is passed in the interface, use encryptedBindingCode to calculate bindingCode in the algorithm
truestring

Response Status:

Status CodeDescriptionSchema
200Pure Bluetooth device binding successfulRegistration code response data«Verified»
5032Token verification failed
5041No permission
5049Device already bound
5052Device not bound
5066Please enter Product Key
5067Please enter Device Key
5106Please enter token
5179Please enter bindingCode
5213Incorrect bindingCode format
5229User domain not authorized for this product
5314Device query failed in cloud platform
5327No permission for this product
5333Device name exceeds length limit
5357Incorrect pwd format
5358No product permission
5361Incorrect DK format
5412Product binding mode is unique, cannot bind repeatedly
5624Home mode not enabled
5636Please enter family ID
5669Regular user has no permission to bind device
5893Failed to add common device
6040Already accepted device sharing
6083Bound device does not belong to current data center

Response Parameters:

Parameter NameParameter DescriptionTypeSchema
codeResponse status codeinteger(int32)integer(int32)
dataResponse dataVerifiedVerified
  verifiedBinding authentication: 0-Not verified 1-Verifiedstring(byte)
extMsgExtended messagestring
msgResponse messagestring

Response Example:

javascript
{
	"code": 0,
	"data": {
		"verified": ""
	},
	"extMsg": "",
	"msg": ""
}