Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/chat/member/friendswitch/update |
| HTTP Method | POST |
| Supported app types | appType-Internal app |
| Required permissions | permission-qyapi_chat_manage-DingTalk group basic information management permission |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | 6d1bxxxx | The App credential for calling this API. Obtain it through the API for getting the access_token of an Internal app. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| chatid | String | Yes | chatdafe234xxxx | The Chat ID of the organization. Obtain it in one of the following ways: - Call the Server-side API for creating a group to obtain the value of the chatid parameter. - Call the Client-side chooseChat API to obtain the value of the chatId parameter. |
| is_prohibit | Boolean | Yes | true | Whether to turn on the restriction switch. - true: Turn on the restriction switch. - false: Turn off the restriction switch. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| success | Boolean | true | Whether the configuration is successful. - true: Success. - false: Failed. |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| request_id | String | 10c0wc48i6qzz | The request ID. |
Response example
Error codes
If an error is returned when you call this API, refer to the Global error codes documentation for solutions.| Error code (errorcode) | Error message (errmsg) | Solution |
|---|---|---|
| 34001 | Invalid chatid | Check whether the chatid meets the requirements. |
| 40036 | Empty parameter | Confirm that all required parameters have been provided. |
| 400001 | system error | Try again later. |