Skip to main content

Modify User Information (modifyProfile)

The modifyProfile API is used to modify LI PASS user information.

Request parameters​

ParametersTypeDescriptionNote
tokenstringUser authorization token for LI PASSRequired
openidstringUID for LI PASSRequired
user_namestringUsername used for loginOptional
nick_namestringUser nickname for display, can be repeatedOptional
regionstringISO 3166-1 Numeric code for a country or region
For example, 156 represents China, and 040 represents Austria
Optional
is_receive_emailnumberWhether to receive email notifications
1: Receive
Others: Do not receive
Optional

Request sample​

accountApi.modifyProfile(
{
token: 'xxx',
openid: 'xxx',
user_name: 'xxx',
nick_name: 'xxx',
birthday: 'xxx',
region: 'xxx'
}
).then((res) => {
console.log(res);
});

Response parameters​

ParametersTypeDescription
retnumberReturn code
0: Request successful
!=0: Request failed, refer to msg for detailed results
msgstringResult Explanation
birthdaystringUser birthday
YYYY-MM
emailstringEmail
is_receive_emailnumberWhether to receive email notifications
1: Receive
Others: Do not receive
lang_typestringLanguage type
See Language Type Definition
nick_namestringUser nickname for display, can be repeated
phonestringPhone number
phone_area_codestringPhone area code
regionstringISO 3166-1 Numeric code for a country or region
For example, 156 represents China, and 040 represents Austria
seqstringData Stream Message Serial Number
user_namestringUsername used for login

Response sample​

{
birthday: "1998-10",
email: "user@email.com",
is_receive_email: 0,
lang_type: "en",
msg: "Success",
nick_name: "abc",
phone: "",
phone_area_code: "",
region: "156",
ret: 0,
seq: "1638239120-0180225310-032531-0000366843",
user_name: "abc",
}