Get Temporary Password

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

Get the information about a temporary password of a smart lock.

API address

GET: /v1.0/devices/{device_id}/door-lock/temp-password/{password_id}

Request parameter

Parameter name Type IN Required Description
device_id String uri true The device ID.
password_id Long uri true The serial number of a specified password.

Return parameter

Parameter name Type Description
result JSONObject

Description of result

Parameter name Type Description
id Long The serial number of a specified temporary password.
name String The name of a specified temporary password.
phase Integer Password status. Valid values:
  • Zigbee:
    • 1: to be created
    • 2: normal
    • 3: frozen
    • 4: deleted
    • 5: failed to be created
  • Wi-Fi:
    • 0: deleted
    • 1: to be sent
    • 2: sent
    • 3: to be deleted
  • Bluetooth:
    • 0: deleted
    • 1: to be issued
    • 2: issued
    • 3: to be deleted
    • 7: failed to be sent
effective_time Long The effective time. The timestamp is in seconds (10-digit).
invalid_time Long The expiration time. The timestamp is in seconds (10-digit).
phone String The mobile phone number.
time_zone String The time zone.
delivery_status Integer Operation confirmation status. The value is returned by a Zigbee lock. Valid values:
  • 1: The configuration is in progress.
  • 2: The configuration is successful.
  • 3: The configuration failed.
  • 4: The password already exists.
  • 5: The maximum number of passwords has reached.
  • 6: The validity period overlaps.
schedule_list List The list of parameters for schedule tasks.

Description of schedule_list

Parameter name Type Description
invalid_time Long End time. It is stored in minutes. For example, 07:30 indicates that the value is 450. Calculation: 7 x 60 + 30 = 450.

Request example

GET: /v1.0/devices/vdevo15345926009****/door-lock/temp-password/xxx

Return example

{ "result": { "effective_time": 1530841779, "phase": 1, "time_zone": "Asia/Shanghai", "phone": "123547127362", "name": "Tenant A's password", "invalid_time": 1530881779, "id": 1001, "delivery_status": 1 }, "t": 1542626129429, "success": true }

Error code

For more information, see error code.