Set Advanced Password

Last Updated on : 2024-08-19 06:22:28download

Set an advanced password for a smart lock.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Description of body

Parameter nameTypeINRequiredDescription
passwordString 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_typeString trueThe password is encrypted using a ticket.
ticket_idString trueThe ID of the temporary key. Get the temporary key for password encryption.
advanced_typeString trueThe type of advanced password. Valid values:
  • admin: administrator password.
  • emergency: emergency password.

Return parameter

Parameter nameTypeDescription
resultBooleanThe 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.