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

# Batch Query Wi-Fi Information

> Call this API to batch query the Wi-Fi list of a specified attendance group by attendance group ID, with pagination.

Call this API to batch query the Wi-Fi list of a specified attendance group.

## Request

| **Basic Information** | |
| - | - |
| HTTP URL | [https://api.dingtalk.io/topapi/attendance/group/wifis/query](https://api.dingtalk.io/topapi/attendance/group/wifis/query) |
| HTTP Method | POST |
| Supported app types | appType-Internal app |
| Required permissions | permission-qyapi\_attendance\_group\_read-Attendance group query permission |

### Query Parameters

| Name | Type | Required | Example | Description |
| - | - | - | - | - |
| access\_token | String | Yes | 4c9ebd2b1534xxxx | The App credential used to call this API. Obtain it by calling the [Get the access\_token of an Internal App](https://help.dingtalk.io/open/development/obtain-orgapp-token) API. |

### Request Body

| Name | Type | Required | Example | Description |
| - | - | - | - | - |
| cursor | String | No | 0151E022xxxx | The last ID of the previous batch. Empty by default. |
| size | Number | Yes | 50 | The page size. |
| op\_userid | String | No | user01 | The user ID of the operator. |
| group\_key | String | Yes | 015xxxx | The attendance group ID.  **Note**  If your attendance group identifier is group\_id, call the [Convert groupId to groupKey](https://help.dingtalk.io/open/development/groupid-to-groupkey.md) API to convert group\_id to group\_key. |

### Request Example

```curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.dingtalk.io/topapi/attendance/group/wifis/query" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=698cxxxx9b13' \
-d 'cursor=0151E0xxxx17E876' \
-d 'group_key=0151Exxxx17E876' \
-d 'op_userid=123456' \
-d 'size=50'
```

Java

```java theme={"theme":{"light":"github-light","dark":"github-dark"}}
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/wifis/query");
OapiAttendanceGroupWifisQueryRequest req = new OapiAttendanceGroupWifisQueryRequest();
req.setCursor("0151E022xxxx");
req.setSize(50L);
req.setOpUserid("user01");
req.setGroupKey("015xxxx");
OapiAttendanceGroupWifisQueryResponse 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.OapiAttendanceGroupWifisQueryRequest("https://api.dingtalk.io/topapi/attendance/group/wifis/query")

req.cursor="0151E0xxxx917E876"
req.size=50
req.op_userid="123456"
req.group_key="0151E0xxxx917E876"
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 OapiAttendanceGroupWifisQueryRequest;
$req->setCursor("0151E0xxxxE876");
$req->setSize("50");
$req->setOpUserid("123456");
$req->setGroupKey("0151E02xxxx7E876");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/group/wifis/query");
```

C#

```csharp theme={"theme":{"light":"github-light","dark":"github-dark"}}
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/wifis/query");
OapiAttendanceGroupWifisQueryRequest req = new OapiAttendanceGroupWifisQueryRequest();
req.Cursor = "0151E022xxxx7E876";
req.Size = 50L;
req.OpUserid = "123456";
req.GroupKey = "0151E02xxxxA917E876";
OapiAttendanceGroupWifisQueryResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
```

## Response

### Response Body

| Name | Type | Example | Description |
| - | - | - | - |
| result | DingOpenResult | | The returned result. |
| result | Result | | The Wi-Fi list query result. |
| wifi\_list | Wifi\[] | | The Wi-Fi list. |
| mac\_addr | String | 54:8D:xx:xx:xx:73 | The MAC address. |
| ssid | String | office-wifi | The Wi-Fi name. |
| wifi\_key | String | E4CB0xxxx | The Wi-Fi key. |
| has\_more | Boolean | true | Whether more data exists.   - **true**: Yes - **false**: No |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| success | Boolean | true | Whether the call succeeded.   - **true**: Success - **false**: Failed |
| request\_id | String | 155qyie8nxoqu | The request ID. |

### Response Body Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "result": {
    "errcode": 0,
    "errmsg":"ok",
    "result": {
      "has_more": false,
      "wifi_list": [
        {
          "mac_addr": "54:8D:xx:xx:xx:73",
          "ssid": "office-wifi",
          "wifi_key": "E4CB0xxxx"
        }
      ]
    },
    "success": true
  },
  "request_id": "155qyie8nxoqu"
}
```

### Error Codes

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


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