Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/role/list |
| HTTP Method | POST |
| Supported app types | appType-Internal app, appType-Third-party enterprise app |
| Permissions | permission-qyapi_get_department_list-Read permission for Contacts department information |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | 6ed1bxxx | The app credential used to call this API. - For an internal app, obtain it through the API for getting the access_token of an internal app. - For a third-party enterprise app, obtain it through the API for getting the access_token of a third-party enterprise. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| size | Number | No | 20 | Supports paginated queries. Takes effect only when set together with the offset parameter. This parameter represents the page size. Default is 20. Maximum is 200. |
| offset | Number | No | 0 | Supports paginated queries. Takes effect only when set together with the size parameter. This parameter represents the offset, which starts from 0. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| request_id | String | ii8a42qgzu7e | The request ID. |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| result | PageVo | The result list. | |
| hasMore | Boolean | false | Whether more data is available. |
| list | OpenRoleGroup[] | The role group list. | |
| name | String | Default | The role group name. |
| groupId | Number | 1507113577 | The role group ID. |
| roles | OpenRole[] | The role list. | |
| name | String | Admin | The role name. |
| id | Number | 1507113578 | The role ID. |
Response body example
Error codes
If an error is returned when you call this API, find a solution in the Global error codes document based on the error message.| Error code (errcode) | Error message (errmsg) | Solution |
|---|---|---|
| 400043 | Invalid orgId | Check whether the access_token is correct. |
| 40069 | Invalid size | Adjust the page size. |
| 40068 | Invalid offset | Adjust the offset. |
| 400001 | System error | Try again later. |