Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/chat/updategroupnick |
| 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 | beE3xxxx | 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 |
|---|---|---|---|---|
| userid | String | Yes | user123 | The userId of the group member whose nickname is to be updated. You can obtain the member’s userId through the Get group chat information API. |
| chatid | String | Yes | chate3929fxxxx | The group chat ID. You can obtain the chatid value through the API for creating a group. |
| group_nick | String | Yes | DingTalk Assistant | The member’s nickname within the group. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| success | Boolean | true | Indicates whether the action succeeded. - true: Success - false: Failed |
| request_id | String | id1aatxt9mco | The request ID. |
Response example
Error codes
If an error is returned when you call this API, refer to the Global error codes document to find the solution based on the error message.| Error code (errorcode) | Error message (errmsg) | Solution |
|---|---|---|
| 40003 | Invalid userid | Verify that the userid is entered correctly. |
| 34001 | Invalid chatid | Verify that the chatid is correct. |
| 41049 | Contains prohibited content | Modify the nickname you entered. |
| 60124 | The user is not in the corresponding group | Update the users in the group. |
| 400002 | Parameter error | Check that the parameters are entered according to the requirements above. |
| 400001 | System error | Try again later. |