Delete temporary password

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

Delete temporary password

API address

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

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
temp_pwd_requestTemplatePwdRequestbodyfalsePassword Data
bodyBodybodytrue

Description of temp_pwd_request

Parameter nameTypeINRequiredDescription
nameString falseTemporary password name, if empty, the default name
pwd_idLong falseTemporary password number
msg_idLong falseMessage ID
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)
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_uidString falseTuya iot development 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
dp_tunnelInteger false
  • Channel for information delivery
  • 1, non-cloud delivery
  • 2, cloud delivery
is_recordBoolean falseWhether to add records
request_idLong falseThe business flow number of the requester, usually the id field of the database or other unique identifiers
dev_id_listList falseDevice ID

Description of body

Parameter nameTypeINRequiredDescription
device_idStringuritrueDevice ID
password_idLonguritruePassword 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

DELETE: /v1.0/devices/6c7129x1yanlxgwx/door-lock/template/temp-password/12345
{
  "dpTunnel": 1
}

Return example

{
    "tid": "c6b6e70e3edd11ed84fd2237f0528b74",
    "result": {
    },
    "t": 1664335776208,
    "success": true
}

Error code

For more information, see error code.