Query User by Username

Last Updated on : 2023-07-19 09:54:50download

Query the detailed information about the specified user based on the username.

API address

GET: /v1.2/iot-02/users/{user_name}

Request parameter

Parameter nameTypeINRequiredDescription
user_nameStringuritrueThe username.

Return parameter

Parameter nameTypeDescription
resultQueryUserResponseThe returned result.

Description of result

Parameter nameTypeDescription
reg_originIntegerThe source of registration.
user_nameStringThe username.
creatorStringThe creator.
account_typeIntegerThe account type.
user_idStringTuya user ID.
mobileStringThe mobile phone number.
emailStringThe email address.
tenant_codeStringThe code of the specified tenant.
country_codeStringThe country code.
user_nick_nameStringThe nickname of the specified user.

Request example

GET: /v1.0/iot-02/users/134****5102

Return example

{
    "result": {
        "account_type": 3,
        "creator": "kun****min",
        "user_name": "134****5102",
        "mobile": "134****5102",
        "user_nick_name": "abc",
        "country_code": "86",
        "user_id": "bay1****O7eE",
        "email": ""
    },
    "t": 1641796815202,
    "success": true
}

Error code

For more information, see error code.