Last Updated on : 2023-06-15 04:53:12
This API operation is used to sync user accounts. To suit your own business scenarios, you can create accounts and modify account information based on the sync parameters.
Note: - Once an account is created, you cannot modify the country code, username, and username type. Confirm the data when you create an account. - If you pass in the same username under the same application, the last password, nickname, or time zone ID of this user will be updated according to the specific sync parameters.
POST: /v1.0/apps/{schema}/user
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
schema | String | uri | true | The channel identifier of the specified app. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
country_code | String | body | true | The code of the specified country or region. |
username | String | body | true | The username. |
password | String | body | true | The user's password. The original password encrypted with MD5 Hash is recommended. |
username_type | Integer | body | true | The type of username. Valid values:
|
nick_name | String | body | false | The nickname. |
time_zone_id | String | body | false | The ID of the specified time zone. |
Parameter name | Type | Description |
---|---|---|
result | JSONObject | The returned result of synchronizing a user. |
Description of result
Parameter name | Type | Description |
---|---|---|
uid | String | Tuya user ID. |
POST: /v1.0/apps/testApp/user
{
"country_code": "86",
"username": "182*****678",
"password": "c7fb2740c5f******4ed765a479fa",
"username_type": 1,
"time_zone_id": "Asia/Shanghai"
}
{
"result": {
"uid": "ay1534*****4744oIAa"
},
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback