ModifyProfile
The modifyProfile
API is used to modify the user profile of an LI PASS.
Request Parameter
Parameter | Type | Description | Remark |
---|---|---|---|
token | string | LI PASS user authorization token | Required |
openid | string | Required | |
user_name | string | Unique username used for login | Optional |
nick_name | string | Repeatable user nickname for display | Optional |
region | string | ISO 3166-1 numeric code for country or region For example 156 for China, 040 for Austria | Optional |
is_receive_email | number | Whether 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
Parameter | Type | Description |
---|---|---|
ret | number | Return code 0: Request success !=0: Request failure, see msg for detailed return message |
msg | string | Return message |
birthday | string | User birthday YYYY-MM |
string | User email | |
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 |
nick_name | string | Repeatable user nickname for display |
phone | string | User phone numer |
phone_area_code | string | Phone area code |
region | string | ISO 3166-1 numeric code for country or region For example 156 for China, 040 for Austria |
seq | string | Sequence number of the message in the data stream |
user_name | string | Unique 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",
}