Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/role/removerolesforemps |
| HTTP Method | POST |
| Supported app types | appType-Internal app |
| Required permissions | permission-qyapi_manage_addresslist-Contacts data management permission |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | 6ed1bxxx | The App credential used to call this API. Obtain it through the API for getting the access_token of an internal app. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| roleIds | String | Yes | 1507113578 | The List of role roleIds. Call the Get role list API to obtain it. The maximum list length is 20. Separate multiple roleIds with commas (,). |
| userIds | String | Yes | user100 | The user ID of the Employee. Call Query users by phone number to obtain the userId. The maximum list length is 100. Separate multiple userIds with commas (,). |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| request_id | String | 10c1rigbngrp5 | The request ID. |
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 |
|---|---|---|
| 33011 | Invalid roleIds | Check whether the roleIds are correct. |
| 33012 | Invalid userId | Check whether the userId is correct. |
| -1 | System busy | Try again later. |