Set Advanced Password

Last Updated on : 2023-12-07 03:34:00download

Set an advanced password for a smart lock.

API address

POST: /v1.0/devices/{device_id}/door-lock/advanced-password

Request parameter

Parameter name Type IN Required Description
device_id String uri true The device ID.

Description of body

Parameter name Type IN Required Description
password String true
  • Original password length: 6.
  • Password transmission encryption algorithm: AES.
  • Mode: ECB mode and PKCS7Padding.
  • Data block: 128 bits.
  • Secret key: To get the original key, decrypt the temporary key ticket_key with AES by using the accessKey that is issued by the Cloud Development Platform.
  • Output format: hex.
password_type String true The password is encrypted using a ticket.
ticket_id String true The ID of the temporary key. Get the temporary key for password encryption.
advanced_type String true The type of advanced password. Valid values:
  • admin: administrator password.
  • emergency: emergency password.

Return parameter

Parameter name Type Description
result Boolean The operation result.

Request example

POST: /v1.0/devices/vdevo15345926009****/door-lock/advanced-password
{ "password_type": "ticket", "password": "7A8F9B6197xxxx7C1D66", "ticket_id": "fJeqZd45", "advanced_type": "emergency" }

Return example

{ "result": true, "t": 1542626129429, "success": true }

Error code

For more information, see error code.