Skip to main content

QueryUserInfo

The queryUserInfo API is used to get user information of an LI PASS.

Request Parameter

ParameterTypeDescriptionRemark
uidstringLI PASS user authorization tokenRequired
openidstringLI PASS UIDRequired

Request Sample

accountApi.queryUserInfo(
{
uid:'xxx',
openid:'xxx',
}
).then((res) => {
console.log(res);
});

Response Parameter

ParameterTypeDescription
retnumberReturn code
0: Request success
!=0: Request failure, see msg for detailed return message
msgstringReturn message
account_typenumberAccount type
1: Email
2: Phone number (currently not supported)
birthdaystringUser birthday
YYYY-MM
emailstringUser email
expireint64Expiration time of the token
Unix time
is_receive_emailnumberWhether to receive email notifications
1: Receiving
others: Not receiving
lang_typestringLanguage type
For more information, see Language Type Definition——Custom Account
nick_namestringRepeatable user nickname for display
privacy_policystringPrivacy policy version
privacy_update_timeint64Time of latest privacy policy update
regionstringISO 3166-1 numeric code for country or region
For example 156 for China, 040 for Austria
terms_of_servicestringTerm of service version
terms_update_timeint64Time of latest term of service update
uidstringLI PASS UID
user_namestringUnique username used for login
seqstringSequence number of the message in the data stream
phonestringUser phone numer
phone_area_codestringPhone 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,
}