# Modify user face recognition information

Modify the user settings information of the employee within the authorization, including the face photo file ID. Modifying the user's facial recognition information currently only supports API modification, and the management background cannot be modified.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/attendance/v1/user_settings/modify
HTTP Method | POST
Rate Limit | [50 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Write attendance management rules(attendance:rule)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
employee_type | string | Yes | The user_ids in the request body and the employee ID type of the user_id in the response body. If you don't have background administrative privileges, you can use [Get user ID by mobile phone number or email](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/batch_get_id)<br>**Example value**: employee_id<br>**Optional values are**:<br>- employee_id：Employee ID, which is the user ID in [Feishu admin background](https://example.feishu.cn/admin/contacts/departmentanduser) > organizational structure > members and departments > member details<br>- employee_no：Employee job number, that is, the job number in [Feishu management background](https://example.feishu.cn/admin/contacts/departmentanduser) > organizational structure > members and departments > member details

### Request body

Parameter | Type | Required | Description
---|---|---|---
user_setting | user_setting | No | User settings
user_id | string | Yes | User ID<br>**Example value**: "abd754f7"
face_key | string | Yes | Face photo file ID, get method: [Upload user facial recognition photo](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/file/upload)<br>**Example value**: "xxxxxb306842b1c189bc5212eefxxxxx"
face_key_update_time | string | No | Time of face photo updates, with the timestamp accurate to seconds<br>**Example value**: "1625681917"

### Request body example
```json
{
    "user_setting": {
        "user_id": "abd754f7",
        "face_key": "xxxxxb306842b1c189bc5212eefxxxxx",
        "face_key_update_time": "1625681917"
    }
}
```

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
user_setting | user_setting | User settings
user_id | string | User ID
face_key | string | Face photo file ID
face_key_update_time | string | Time of face photo updates, with the timestamp accurate to seconds

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "user_setting": {
            "user_id": "abd754f7",
            "face_key": "xxxxxb306842b1c189bc5212eefxxxxx",
            "face_key_update_time": "1625681917"
        }
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 1220001 | param is invalid | The imported parameter verification failed. Please check the imported parameter according to the specific returned information. For example, "employee_type invalid" means that the person type is abnormal. If it still cannot be solved, please contact [Technical Support](https://applink.feishu.cn/TLJpeNdW)
400 | 1220002 | tenant_id is empty | Please check if the tenant_access_token in imported parameter is correct
400 | 1220004 | param is invalid | Please refer to the actual error message returned to troubleshoot the problem. For example, "user_id is not exist or does not have permission" means that the user id passed in by imported parameter does not exist or does not have permission. If it still cannot be solved, please contact [Technical Support](https://applink.feishu.cn/TLJpeNdW)
400 | 1220005 | No scope | Please go to [Attendance Admin](https://oa.feishu.cn/attendance/manage/member/list) to check permission scope on data
500 | 1225000 | param is invalid | Please refer to the actual error message returned to troubleshoot the problem. For example, "internal server error" represents an internal service exception. If it still cannot be solved, please contact [technical support](https://applink.feishu.cn/TLJpeNdW)
400 | 1227000 | Error history code, no longer used | -
400 | 1220600 | General error message | The general error message contains multiple messages. Detailed error messages and handling suggestions can be found in [Error Messages](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/attendance-development-guidelines)

