修改标签
https://chat-go.jwzhd.com/open-apis/v1/group/tag/edit?token=xxxxxxxxxx
POST
curl --location --request POST 'https://chat-go.jwzhd.com/open-apis/v1/group/tag/edit?token=xxxxxxxxxx' \--header 'Content-Type: application/json' \--data-raw '{ "groupId": "123456", "tag": "VIP用户", "newTag": "SVIP用户", "color": "#FF5733", "desc": "VIP会员用户标签(已更新)", "sort": 2}'Content-Type: "application/json; charset=utf-8"| 字段 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| groupId | string | 是 | 群组ID |
| tag | string | 是 | 要修改的标签名称 |
| newTag | string | 否 | 新的标签名称,不传则不修改标签名称 |
| color | string | 否 | 标签颜色,格式为#RRGGBB,如#FF5733 |
| desc | string | 否 | 标签描述 |
| sort | int64 | 否 | 排序值,值越小越靠前 |
机器人需要在该群聊中,且拥有允许控制标签组权限(allowGroupTagManage = 1)
| 字段 | 类型 | 说明 |
|---|---|---|
| code | int | 响应代码 |
| msg | string | 响应信息,包括异常信息 |
| data | Object | 返回数据 |
{ "code": 1, "msg": "success", "data": {}}| 错误码 | 说明 |
|---|---|
| 1002 | 参数缺失或有误 |
| 1003 | 未授权(非法token) |
| -1 | 业务错误(如机器人不在群中、无权限、标签不存在、标签名称已存在等) |