> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the User IDs of Attendance Members

> Call this API with an attendance group ID to get the user IDs of all attendance members in the group by page.

Call this API to get the user IDs of all employees in an attendance group by page.

## API Call Description

If the attendance members include a department, the API returns the user IDs of the employees in that department. It does not return the department ID.

For example, the attendance members include the **Test Department** and the employee **John**. The Test Department has one employee, **Jane**. Calling this API returns the following:

* The user IDs of the employees in the Test Department (including its sub-departments), which is Jane's user ID
* John's user ID

## Request

| **Basic Information** | |
| - | - |
| HTTP URL | [https://api.dingtalk.io/topapi/attendance/group/memberusers/list](https://api.dingtalk.io/topapi/attendance/group/memberusers/list) |
| HTTP Method | POST |
| Supported App Types | appType-Internal app　appType-Third-party enterprise app |
| Permissions | qyapi\_attendance\_group\_read (Attendance group query permission) |

### Query Parameters

| Name | Type | Required | Example | Description |
| - | - | - | - | - |
| access\_token | String | Yes | bE74xxxx | The App credential used to call this API.   - Internal app: Call the [Get the access\_token of an internal app](https://help.dingtalk.io/open/development/obtain-orgapp-token) API to get it. - Third-party enterprise app: Call the API for getting the access\_token of a third-party enterprise to get it. |

### Request Body

| Name | Type | Required | Example | Description |
| - | - | - | - | - |
| cursor | Number | No | 0 | The cursor value, which indicates the starting position. If not specified, the query starts from the first item. |
| op\_user\_id | String | Yes | user123 | The user ID of the operator. |
| group\_id | Number | Yes | 98562 | The attendance group ID.  **Note**  If you use the legacy attendance group identifier group\_key, call the [Convert groupKey to groupId](https://help.dingtalk.io/open/development/convert-groupkey-to-groupid.md) API to convert group\_key to group\_id. |

### Request Example

```curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.dingtalk.io/topapi/attendance/group/memberusers/list" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=e6e94xxxxeb7b3' \
-d 'cursor=9828' \
-d 'group_id=98562' \
-d 'op_user_id=dd_dd'
```

Java

```java theme={"theme":{"light":"github-light","dark":"github-dark"}}
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/memberusers/list");
OapiAttendanceGroupMemberusersListRequest req = new OapiAttendanceGroupMemberusersListRequest();
req.setCursor(0L);
req.setOpUserId("user123");
req.setGroupId(98562L);
OapiAttendanceGroupMemberusersListResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
```

Python

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import dingtalk.api

req=dingtalk.api.OapiAttendanceGroupMemberusersListRequest("https://api.dingtalk.io/topapi/attendance/group/memberusers/list")

req.cursor=9828
req.op_user_id="dd_dd"
req.group_id=98562
try:
  resp= req.getResponse(access_token)
  print(resp)
except Exception,e:
  print(e)
```

PHP

```php theme={"theme":{"light":"github-light","dark":"github-dark"}}
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');

$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
$req = new OapiAttendanceGroupMemberusersListRequest;
$req->setCursor("9828");
$req->setOpUserId("dd_dd");
$req->setGroupId("98562");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/group/memberusers/list");
```

C#

```csharp theme={"theme":{"light":"github-light","dark":"github-dark"}}
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/memberusers/list");
OapiAttendanceGroupMemberusersListRequest req = new OapiAttendanceGroupMemberusersListRequest();
req.Cursor = 9828L;
req.OpUserId = "dd_dd";
req.GroupId = 98562L;
OapiAttendanceGroupMemberusersListResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
```

## Response

### Response Body

| Name | Type | Example | Description |
| - | - | - | - |
| request\_id | String | 3pgsafymemlr | The request ID. |
| errcode | Number | 0 | The return code. |
| success | Boolean | true | Indicates whether the call succeeded.   - **true**: Success - **false**: Failed |
| result | PageResult | | The User List. |
| has\_more | Boolean | false | Indicates whether more Data is available.   - **true**: Yes - **false**: No |
| cursor | Number | 1387570559 | The starting position of the next paged request. |
| result | String\[] | \["user123","user456"] | The list of user IDs in the attendance group. |

### Response Body Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "errcode": 0,
  "result": {
    "cursor": 1387570559,
    "has_more": false,
    "result": [
      "user123",
      "user456"
    ]
  },
  "success": true,
  "request_id": "146drwo74wiss"
}
```

### Error Codes

If the API call returns an Error, use the error message to find a solution in the [Global error codes](https://help.dingtalk.io/open/development/server-api-error-codes-1.md) Document.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.