API call description
- Call the API after 9:00 AM to get the data of the previous day.
- This API only returns the list of employees who did not sign in to DingTalk within the past month.
Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/inactive/user/v2/get |
| HTTP Method | POST |
| Supported app types | appType-Internal app |
| Required permissions | permission-qyapi_liveness_base-Permission to access organization activity data |
Query parameter
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | 6d1bxxxx | The app credential used to call this API. Obtain it by calling the API for getting the access_token of an internal app. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| is_active | Boolean | Yes | false | Whether the user is active: - false: Not signed in - true: Signed in |
| dept_ids | String | No | 1,2,3 | The department ID list. Obtain it by calling Get the department list. If left empty, the entire organization is queried. |
| offset | Number | Yes | 1 | Supports pagination. Takes effect only when set together with the size parameter. This parameter indicates the offset, starting from 0. |
| size | Number | Yes | 100 | Supports pagination. Takes effect only when set together with the offset parameter. This parameter indicates the page size. The maximum value is 100. |
| query_date | String | Yes | 20200101 | The query date. The format is yyyyMMdd. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| result | PageVo | The returned result. | |
| next_cursor | Number | 1000 | The offset of the next page. |
| list | String[] | [“user123”,“user456”] | The list of users who did not sign in. |
| has_more | Boolean | false | Whether more data is available. |
| errmsg | String | ok | The return code description. |
| errcode | Number | 0 | The return code. |
| request_id | String | o565d47xy9cz | The request ID. |
Response body example
Error codes
If an error occurs when calling this API, refer to the Global error codes document to find a solution based on the error message.| Error code (errcode) | Error message (errmsg) | Solution |
|---|---|---|
| 400002 | Invalid parameter | Check whether the required parameters meet the requirements. |
| 40069 | Invalid size | Check the page size. |
| 40068 | Invalid offset | Adjust the offset. |
| 400002 | Invalid parameter format | Check the format of the input parameters. |
| -1 | System busy | Try again later. |