Update Personal Information
After the user logs in successfully, call this API to update personal information. This API does not support modifying personal password, mobile phone number, or email address.
This is a post-login API. You need to add authorization information in the header: Authorization.
Request Description
Request Headers
| Parameter Name | Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Caller client operating system version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Caller client device fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Caller client IP | No | String | 192.168.1.2 |
| X-agent | User-Agent information | Yes | String | Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) |
| X-L | Used for internationalization language setting | No | String | zh |
| X-client-id | Application authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
| Authorization | Authorization information | Yes | String | Bearer {id_token} |
| content-type | Content format type | Yes | String | application/json |
Request Example
json
{
"user_name": "zhangsan",
"name": "张三",
"head_img": "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIQ8QOTbqc2bmP0WibUIUskX39eJlJAEbAibXs",
"attr_gender": "male",
"attr_birthday": "2022-02-17",
"attr_nick_name": "张三",
"mailing_address": "湖北省武汉市",
"zip_code": "430000",
"first_name": "zhangsan",
"middle_name": "zhangsan",
"last_name": "zhangsan",
"industry": "事业单位",
"extension": {
"age": "18"
}
}Request Parameters
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| user_name | Username | No | String | |
| name | Name | No | String | |
| head_img | Avatar (URL) | No | String | |
| attr_gender | Gender | No | String | Optional values: female: Female; male: Male; unknow: Keep confidential |
| attr_birthday | Birthday | No | String | Format: yyyy-MM-dd |
| attr_nick_name | Nickname | No | String | |
| mailing_address | Mailing address | No | String | |
| zip_code | Zip code | No | String | |
| first_name | First name | No | String | |
| middle_name | Middle name | No | String | |
| last_name | Last name | No | String | |
| industry | Industry | No | String | |
| extension | Extended attributes | No | JSONObject | Extended attributes need to be defined in the enterprise |
Response Example
Success Example
HTTP/1.1 200 OK
Error Example
HTTP/1.1 400 Bad Request
json
{
"error_code": "IDAAS.SDK.PARAM.0016",
"error_msg": "IdToken is invalid or expired"
}Response Parameters
None
Error Codes
| Status Code | Error Code | Chinese Error Message | English Error Message | Resolution |
|---|---|---|---|---|
| 400 | IDAAS.SDK.USER.0018 | 用户名不符合校验规则 | The username does not meet the verification rules | Please check whether the username field in the input parameters complies with the validation rules for the username field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0019 | 姓名不符合校验规则 | The name does not meet the verification rules | Please check whether the name field in the input parameters complies with the validation rules for the name field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0023 | 性别不符合校验规则 | The gender does not meet the verification rules | Please check whether the gender field in the input parameters complies with the validation rules for the gender field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0024 | 生日不符合校验规则 | The birthday does not meet the verification rules | Please check whether the birthday field in the input parameters complies with the validation rules for the birthday field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0025 | 昵称不符合校验规则 | The nickname does not meet the verification rules | Please check whether the nickname field in the input parameters complies with the validation rules for the nickname field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0026 | 邮寄地址不符合校验规则 | The mailing address does not meet the verification rules | Please check whether the mailing address field in the input parameters complies with the validation rules for the mailing address field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0027 | 邮政编码不符合校验规则 | The zip code does not meet the verification rules | Please check whether the zip code field in the input parameters complies with the validation rules for the birthday field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0028 | 名字不符合校验规则 | The first name does not meet the verification rules | Please check whether the first name field in the input parameters complies with the validation rules for the first name field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0029 | 中间名不符合校验规则 | The middle name does not meet the verification rules | Please check whether the middle name field in the input parameters complies with the validation rules for the middle name field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0030 | 姓氏不符合校验规则 | The last name does not meet the verification rules | Please check whether the last name field in the input parameters complies with the validation rules for the last name field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0031 | 所属行业不符合校验规则 | The industry does not meet the verification rules | Please check whether the industry field in the input parameters complies with the validation rules for the industry field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0033 | 扩展属性{0}不符合校验规则 | The extended attribute {0} does not meet the verification rules | Please check whether the extended attribute {0} field in the input parameters complies with the validation rules for the extended attribute {0} field in [Enterprise Center - User - User Attribute Definition] |
| 400 | IDAAS.SDK.USER.0034 | 用户名已存在 | Username already exists | Please check whether the user exists |
| 400 | IDAAS.SDK.USER.0037 | 扩展属性{0}已存在 | Extended property {0} already exists | Delete the extended attribute {0} and re-add it, or replace it with an extended attribute {0} that has not been added. |
| 400 | IDAAS.SDK.PARAM.0001 | 设备信息不完整 | Device information is incomplete | Please check whether the input device information is complete |
| 400 | IDAAS.SDK.PARAM.0002 | clientId不能为空 | clientId cannot be empty | Please check whether the input clientId is empty |
| 400 | IDAAS.SDK.PARAM.0003 | 应用未注册,请先注册应用 | The app is not registered, please register the app first | Please check whether the input clientId is correct |
| 400 | IDAAS.SDK.PARAM.0015 | IdToken不能为空 | IdToken cannot be empty | Please check whether the input IdToken is empty |
| 400 | IDAAS.SDK.PARAM.0016 | IdToken无效或已过期 | IdToken is invalid or expired | Please re-acquire the IdToken and try again |
| 400 | IDAAS.SDK.USER.0001 | 用户未找到 | User not found | Please register first and try again |