Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/user/get_admin_scope |
| HTTP Method | POST |
| Supported app types | appType-Internal app, appType-Third-party enterprise app |
| Required permissions | permission-qyapi_get_member-Read permission for user information |
Query parameter
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | bE74xxxx | 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 |
|---|---|---|---|---|
| userid | String | Yes | manger123 | The user ID of the Admin. Call the Get the admin list API to get the admin IDs in your current Organization. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| request_id | String | zpucraudovy0 | The request ID. |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| dept_ids | Number[] | [1] | The List of Department IDs that the admin can manage. |
Response body example
Error codes
If an error is returned when you call this API, find the solution in the Global error codes document based on the error message.| Error code (errcode) | Error message (errmsg) | Solution |
|---|---|---|
| 60121 | Employee not found | Confirm whether the userId is correct. |
| 40036 | Parameter is empty | Confirm that all required parameters are provided. |
| 400001 | System error | Try again later. |