Get Temporary Key

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

Get the temporary key for password encryption.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultLockTicketVO

Description of result

Parameter nameTypeDescription
ticket_idStringThe ID of the temporary key.
ticket_keyStringThe temporary key. It can be used after decryption with AES based on the accessKey that is issued by the Cloud Development Platform.
expire_timeLongRemaining validity period.

Request example

POST: /v1.0/devices/vdevo15345926009****/door-lock/password-ticket

Return example

{
    "result": {
        "expire_time": 360,
        "ticket_id": "9wxxoLM",
        "ticket_key": "901CC35A67DA3429C38E9622xxxxx3EAE1CE333462356D257FD1*****"
    },
    "t": 1592899848757,
    "success": true
}

Error code

For more information, see error code.