Create temporary password

Last Updated on : 2023-12-07 03:34:02

Create temporary password

API address

POST: /v1.0/smart-lock/device/{device_id}/template/temp-password

Request parameter

Parameter nameTypeINRequiredDescription

Description of body

Parameter nameTypeINRequiredDescription
nameString falseTemporary password name, if empty, the default name
pwd_idLong falseTemporary password number
msg_idLong falseMessage ID
uidString false
passwordString false
  • The original length of the password is
    • Wi-Fi lock: 7
    • Zigbee lock/Bluetooth lock: 6
    < /li>
  • Encryption algorithm: AES
  • Mode: ECB pkcs7padding
  • Data block: 128 bits
  • Key: temporary ticket_key obtained through the interface, The original key decrypted using developer accessKey AES
  • The output is in the format: hex
effective_timeLong falseEffective time (10-digit timestamp)
invalid_timeLong falseExpiration time (10-digit timestamp)
password_typeString falsePassword encryption type
  • ticket
ticket_idString falseTemporary Key ID
phoneString falseMobile number
typeInteger falsePassword valid type
  • 1: One-time valid
  • 0: Always valid within the valid time range
time_zoneString falseTime zone. If periodic function is required, you need to fill in this
bluetooth_symbolicBoolean falseSpecial parameters for Bluetooth door lock with gateway
  • true: send temporary password data through gateway
  • false: do not send data to door lock, only save records
schedule_listList falseperiodic information
snString falseThe serial number of the password of the Bluetooth product
check_nameBoolean falseWhether to check whether the name is repeated
  • true: yes
  • false: no
country_codeString falseUser's country code
iot_uidSstring falseiot platform user id, this parameter can be used to send SMS
app_idInteger falseBusiness appId
available_timeInteger falseUser's country code
sms_param_mapMap falseSet of dynamic parameters when sending SMS
sms_templateString falseSMS template (if passed, this template shall prevail)
dp_tunnelInteger falseInformation distribution channel 1, non-cloud distribution 2, cloud distribution
is_recordBoolean falseWhether to add records
device_idStringuritrueDevice Id

Description of schedule_list

Parameter nameTypeINRequiredDescription
effective_timeLong falseStart time. Stored in minutes, such as "07:30", the value is 7x60+30=450
invalid_timeLong falseEnd time. Stored in minutes, such as "08:30", the value is 8x60+30=510
working_dayInteger falseWeek, each value accumulates:
  • Sunday: 1
  • Monday: 2
  • Tuesday: 4
  • Wednesday : 8
  • Thursday: 16
  • Friday: 32
  • Saturday: 64

Return parameter

Parameter nameTypeDescription
resultTemplatePwdResponse

Description of result

Parameter nameTypeDescription
pwd_idLongTemporary password number

Request example

POST: /v2.0/smart-lock/devices/vdevo15345926009****/temp-passwords

Error code

For more information, see error code.