Last Updated on : 2024-03-20 09:03:22download
Commercial Lock App SDK supports multiple types of user accounts, such as mobile phone numbers, email addresses, and app UIDs.
Different types of accounts support the following specific capabilities:
The user registration method requires the countryCode
parameter to specify the country code, enabling the selection of the nearest data center based on the users’ location.
The data in different data centers is isolated from each other. For example, an account that is registered in the United States (1) cannot be used in mainland China (86). Otherwise, an error message is returned to indicate that the account does not exist. For more information, see Data Centers.
In this module, the User
object is frequently called. This object is a singleton that stores all data of the current user, including login and registration methods. The following table describes the data model of the object.
Field | Description |
---|---|
headPic | The URL of the user avatar. |
nickName | The nickname of the user. |
username | The username.
|
mobile | The mobile phone number. |
The email address. | |
phoneCode | The country code. Valid values:
|
Domain.regionCode | The data center to which the current account belongs. Valid values:
|
timezoneId | The time zone ID. Example: Asia/Shanghai . |
tempUnit | The temperature unit. Valid values:
|
snsNickname | The nickname of a third-party account. |
regFrom | The type of registration. Valid values:
|
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback