QueryUserInfo
The queryUserInfo
API is used to get user information of an LI PASS.
Request Parameter
Parameter | Type | Description | Remark |
---|---|---|---|
uid | string | LI PASS user authorization token | Required |
openid | string | LI PASS UID | Required |
Request Sample
accountApi.queryUserInfo(
{
uid:'xxx',
openid:'xxx',
}
).then((res) => {
console.log(res);
});
Response Parameter
Parameter | Type | Description |
---|---|---|
ret | number | Return code 0: Request success !=0: Request failure, see msg for detailed return message |
msg | string | Return message |
account_type | number | Account type 1: Email 2: Phone number (currently not supported) |
birthday | string | User birthday YYYY-MM |
string | User email | |
expire | int64 | Expiration time of the token Unix time |
is_receive_email | number | Whether to receive email notifications 1: Receiving others: Not receiving |
lang_type | string | Language type For more information, see Language Type Definition——Custom Account |
nick_name | string | Repeatable user nickname for display |
privacy_policy | string | Privacy policy version |
privacy_update_time | int64 | Time of latest privacy policy update |
region | string | ISO 3166-1 numeric code for country or region For example 156 for China, 040 for Austria |
terms_of_service | string | Term of service version |
terms_update_time | int64 | Time of latest term of service update |
uid | string | LI PASS UID |
user_name | string | Unique username used for login |
seq | string | Sequence number of the message in the data stream |
phone | string | User phone numer |
phone_area_code | string | Phone area code |
Response Sample
{
account_type: 1,
birthday: "2000-01",
email: "user@email.com",
expire: 1638494026,
is_receive_email: 0,
lang_type: "en",
msg: "Success",
nick_name: "nick",
phone: "",
phone_area_code: "",
privacy_policy: "1",
privacy_update_time: 1638196548,
region: "156",
ret: 0,
seq: "1638194050-0180225865-002725-0000292413",
terms_of_service: "1",
terms_update_time: 1638196548,
uid: "xxx",
user_name: "username",
username_pass_verify: 1,
}