# 拉取已授权的账号信息

[调试诊断](https://developers.weixin.qq.com/console/devtools/debug?utm_source=api_tools)

> 接口应在服务器端调用，不可在前端（小程序、网页、APP等）直接调用，具体可参考[接口调用指南](/doc/oplatform/developers/dev/guide.md)。

接口英文名：getAuthorizerList

使用本 API 拉取当前所有已授权的账号基本信息。

## 1. 调用方式

### HTTPS 调用

```bash
POST https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_list?access_token=ACCESS_TOKEN
```

### 云调用

- 本接口不支持云调用。

### 第三方调用

- 本接口仅支持第三方平台使用 [component_access_token](/doc/oplatform/developers/dev/ComponentAccessToken.md) 自己调用。

## 2. 请求参数

### 查询参数 `Query String Parameters`

```json
[
  {
    "参数名": "access_token",
    "类型": "string",
    "必填": "是",
    "说明": "接口调用凭证，可使用 [component_access_token](/doc/oplatform/openApi/ticket-token/api_getcomponentaccesstoken)"
  }
]
```

### 请求体 `Request Payload`

```json
[
  {
    "参数名": "component_appid",
    "类型": "string",
    "必填": "是",
    "说明": "第三方平台 APPID"
  },
  {
    "参数名": "offset",
    "类型": "number",
    "必填": "是",
    "说明": "偏移位置/起始位置"
  },
  {
    "参数名": "count",
    "类型": "number",
    "必填": "是",
    "说明": "拉取数量，最大为 500"
  }
]
```

## 3. 返回参数

### 返回体 `Response Payload`

```json
[
  {
    "参数名": "total_count",
    "类型": "number",
    "说明": "授权的账号总数"
  },
  {
    "参数名": "list",
    "类型": "objarray",
    "说明": "当前查询的帐号基本信息列表"
  }
]
```

">

### Res.list(Array) `Object Payload`

当前查询的帐号基本信息列表

```json
[
  {
    "参数名": "authorizer_appid",
    "类型": "string",
    "说明": "已授权账号的 appid"
  },
  {
    "参数名": "refresh_token",
    "类型": "string",
    "说明": "刷新令牌authorizer_refresh_token"
  },
  {
    "参数名": "auth_time",
    "类型": "number",
    "说明": "授权的时间"
  }
]
```

## 4. 注意事项

本接口无特殊注意事项

## 5. 代码示例

请求示例

```json
{
  "component_appid": "appid_value",
  "offset": 0,
  "count": 100
}
```

返回示例

```json
{
  "total_count": 33,
  "list": [
    {
      "authorizer_appid": "authorizer_appid_1",
      "refresh_token": "refresh_token_1",
      "auth_time": 1558000607
    },
    {
      "authorizer_appid": "authorizer_appid_2",
      "refresh_token": "refresh_token_2",
      "auth_time": 1558000607
    }
  ]
}
```

## 6. 错误码

以下是本接口的错误码列表，其他错误码可参考 [通用错误码](/doc/oplatform/developers/errCode/README.md)；调用接口遇到报错，可使用官方提供的 [API 诊断工具](https://developers.weixin.qq.com/console/devtools/debug?utm_source=api_errcode) 辅助定位和分析问题。

```json
[
  {
    "错误码": "-1",
    "错误描述": "system error",
    "解决方案": "系统繁忙，此时请开发者稍候再试"
  },
  {
    "错误码": "0",
    "错误描述": "ok",
    "解决方案": "ok"
  },
  {
    "错误码": "40001",
    "错误描述": "invalid credential  access_token isinvalid or not latest",
    "解决方案": "获取 access_token 时 AppSecret 错误，或者 access_token 无效。请开发者认真比对 AppSecret 的正确性，或查看是否正在为恰当的公众号调用接口"
  },
  {
    "错误码": "40013",
    "错误描述": "invalid appid",
    "解决方案": "不合法的 AppID ，请开发者检查 AppID 的正确性，避免异常字符，注意大小写"
  },
  {
    "错误码": "40170",
    "错误描述": "args count exceed count limit",
    "解决方案": "个数超出限制"
  }
]
```

## 7. 适用范围

本接口支持「第三方平台」账号类型调用。其他账号类型如无特殊说明，均不可调用。
