# Query all attendance groups

Turn the page to get a list of all attendance groups. Include attendance group name and attendance group id

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/attendance/v1/groups
HTTP Method | GET
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.**<br>Enable any scope from the list | Write attendance management rules(attendance:rule)<br>Export attendance management rules(attendance:rule:readonly)

### 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)

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
page_size | int | No | paging size<br>**Example value**: 10<br>**Default value**: `10`<br>**Data validation rules**:<br>- Value range: `1` ～ `50`
page_token | string | No | Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups<br>**Example value**: wgNOR1rmxogRvAsGl6CXlQ==

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
group_list | group_meta\[\] | Attendance group List
group_id | string | Attendance group ID
group_name | string | Attendance group name
page_token | string | Page identifier, when has_more is true, a new page_token will also be returned. Otherwise, page_token will not be returned
has_more | boolean | Whether the response body has more parameters

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "group_list": [
            {
                "group_id": "6919358128597097404",
                "group_name": "Attendance group 1"
            }
        ],
        "page_token": "wgNOR1rmxogRvAsGl6CXlQ==",
        "has_more": true
    }
}
```

### 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 | 1220600 | Generic error message | Common error messages contain multiple items. For detailed error messages and handling suggestions, see [Error Messages](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/attendance-development-guidelines)

