Register User

Last Updated on : 2023-06-20 14:18:56download

Register a user with a specified username, password, and country code.

API address

POST: /v1.0/iot-02/users

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
usernameString trueThe username.
passwordString trueThe password, encrypted with SHA256 and converted to lower case.
country_codeString trueThe country code.
creatorString falseThe creator.
user_nick_nameString falseThe nickname of a specified user.

Return parameter

Parameter nameTypeDescription
resultAddUserResponseThe returned result of registering a user.

Description of result

Parameter nameTypeDescription
user_idStringTuya user ID.

Request example

POST: /v1.0/iot-02/users

Return example

{
    "user_id": "bay1****0430"
}

Error code

For more information, see error code.