Change Password

Last Updated on : 2023-06-20 15:19:23download

Change a password by entering the user ID, old password, and new password.

API address

PUT: /v1.0/iot-02/users/{user_id}

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
user_idString trueTuya user ID.
old_passwordString trueThe old password, encrypted with SHA256 and converted to lower case.
new_passwordString trueThe new password, encrypted with SHA256 and converted to lower case.
tenant_codeString falseThe code of a specified tenant.

Return parameter

Parameter nameTypeDescription
resultBooleanThe result of changing the password. Valid values:
  • true: Changed the password successfully.
  • false: Failed to change the password.

Request example

PUT: /v1.0/iot-02/users/1374932****62112

Return example

{
    "result": true,
    "t": 1616644441044,
    "success": true
}

Error code

For more information, see error code.