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

# 管理者リストの取得

> 企業管理者の一覧をAPI経由で取得し、権限を確認して管理体制を把握できます

本 API を呼び出して管理者リストを取得します。

## API 呼び出し説明

本 API は連絡先の権限スコープによる制限を受けません。

## リクエスト

| **基本情報**     |                                                                                                |
| ------------ | ---------------------------------------------------------------------------------------------- |
| HTTP URL     | [https://api.dingtalk.io/topapi/user/listadmin](https://api.dingtalk.io/topapi/user/listadmin) |
| HTTP Method  | POST                                                                                           |
| サポートするアプリタイプ | appType-社内アプリappType-サードパーティ社内アプリ                                                              |
| 必要な権限        | permission-qyapi\_get\_member-ユーザー情報の読み取り権限                                                    |

### クエリパラメータ

| 名前            | タイプ    | 必須 | 例        | 説明                                                                                                                                                                           |
| ------------- | ------ | -- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| access\_token | String | 必須 | bE74xxxx | 本 API を呼び出すアプリ認証情報。   - 社内アプリの場合、[社内アプリの access\_token 取得](/ja/open/development/obtain-orgapp-token) API から取得します。 - サードパーティ社内アプリの場合、サードパーティ企業の access\_token 取得 API から取得します。 |

### リクエスト例

```curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.dingtalk.io/topapi/user/listadmin" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=ba1dfdcc-8a86-4b95-bcb8-af2f9f91ae12'
```

Java

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/user/listadmin");
OapiUserListadminRequest req = new OapiUserListadminRequest();
OapiUserListadminResponse 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.OapiUserListadminRequest("https://api.dingtalk.io/topapi/user/listadmin")
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 OapiUserListadminRequest;
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/user/listadmin");
```

C#

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/user/listadmin");
OapiUserListadminRequest req = new OapiUserListadminRequest();
OapiUserListadminResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
```

## レスポンス

### レスポンスボディ

| 名前          | タイプ                  | 例            | 説明                                      |
| ----------- | -------------------- | ------------ | --------------------------------------- |
| request\_id | String               | 4f9md9obopn2 | リクエスト ID。                               |
| errcode     | Number               | 0            | リターンコード。                                |
| errmsg      | String               | ok           | リターンコードの説明。                             |
| result      | ListAdminResponse\[] |              | 戻り結果。                                   |
| userid      | String               | 203xxxx1     | 管理者の userid。                            |
| sys\_level  | Number               | 1            | 管理者ロール：   - **1**：スーパー管理者 - **2**：サブ管理者 |

### レスポンスボディ例

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "errcode": 0,
  "errmsg":"ok",
  "result": [
    {
      "sys_level": 2,
      "userid": "203xxxx1"
    },
    {
      "sys_level": 1,
      "userid": "mxxxxx0"
    }
  ],
  "request_id": "4f9md9obopn2"
}
```

### エラーコード

本 API の呼び出しでエラーが発生した場合、エラーメッセージをもとに [グローバルエラーコード](/ja/open/development/server-api-error-codes-1) ドキュメントで解決方法を検索してください。

| エラーコード（errcode） | エラーコードの説明（errmsg） | 解決方法                           |
| --------------- | ----------------- | ------------------------------ |
| 43007           | 権限付与が必要です         | access\_token に操作権限があるかご確認ください |
| -1              | システムビジー           | 後で再試行してください                    |
