Get Temporary Password

Last Updated on : 2024-08-19 06:20:55download

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 nameTypeINRequiredDescription
device_idStringuritrueThe device ID.
password_idLonguritrueThe serial number of a specified password.

Return parameter

Parameter nameTypeDescription
resultJSONObject

Description of result

Parameter nameTypeDescription
idLongThe serial number of a specified temporary password.
nameStringThe name of a specified temporary password.
phaseIntegerPassword 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_timeLongThe effective time. The timestamp is in seconds (10-digit).
invalid_timeLongThe expiration time. The timestamp is in seconds (10-digit).
phoneStringThe mobile phone number.
time_zoneStringThe time zone.
delivery_statusIntegerOperation 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_listListThe list of parameters for schedule tasks.

Description of schedule_list

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