Skip to main content

ModifyProfile

The modifyProfile API is used to modify the user profile of an LI PASS.

Request Parameter

ParameterTypeDescriptionRemark
tokenstringLI PASS user authorization tokenRequired
openidstringRequired
user_namestringUnique username used for loginOptional
nick_namestringRepeatable user nickname for displayOptional
regionstringISO 3166-1 numeric code for country or region
For example 156 for China, 040 for Austria
Optional
is_receive_emailnumberWhether to receive email notifications
1: Receiving
others: Not receiving
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 Parameter

ParameterTypeDescription
retnumberReturn code
0: Request success
!=0: Request failure, see msg for detailed return message
msgstringReturn message
birthdaystringUser birthday
YYYY-MM
emailstringUser email
is_receive_emailnumberWhether to receive email notifications
1: Receiving
others: Not receiving
lang_typestringLanguage type
For more information, see Language Type Definition
nick_namestringRepeatable user nickname for display
phonestringUser phone numer
phone_area_codestringPhone area code
regionstringISO 3166-1 numeric code for country or region
For example 156 for China, 040 for Austria
seqstringSequence number of the message in the data stream
user_namestringUnique username 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",
}