Modify User Information (modifyProfile)
The modifyProfile API is used to modify LI PASS user information.
Request parameters
| Parameters | Type | Description | Note |
|---|---|---|---|
| token | string | User authorization token for LI PASS | Required |
| openid | string | UID for LI PASS | Required |
| user_name | string | Username used for login | Optional |
| nick_name | string | User nickname for display, can be repeated | Optional |
| region | string | Numeric codes of countries or regions as per ISO 3166-1 For example, 156 represents China, and 040 represents Austria. | Optional |
| is_receive_email | number | Whether 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
| Parameters | Type | Description |
|---|---|---|
| ret | number | Return code 0: Request successful !=0: Request failed, refer to msg for detailed results |
| msg | string | Result Explanation |
| birthday | string | User birthday YYYY-MM |
| string | ||
| is_receive_email | number | Whether to receive email notifications 1: Receive Others: Do not receive |
| lang_type | string | Language type See Language Type Definition |
| nick_name | string | User nickname for display, can be repeated |
| phone | string | Phone number |
| phone_area_code | string | Phone area code |
| region | string | Numeric codes of countries or regions as per ISO 3166-1 For example, 156 represents China, and 040 represents Austria |
| seq | string | Data stream message sequence |
| user_name | string | 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",
}