Skip to content

用户禁言

https://chat-go.jwzhd.com/open-apis/v1/group/gag-member?token=xxxxxxxxxx

POST

curl --location --request POST 'https://chat-go.jwzhd.com/open-apis/v1/group/gag-member?token=xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": "7058262",
"groupId": "123456",
"gag": 600
}'
Content-Type: "application/json; charset=utf-8"
字段类型是否必填说明
userIdstring被禁言用户ID
groupIdstring群组ID
gagint64禁言时长(秒)
0: 解除禁言
600: 禁言10分钟
3600: 禁言1小时
21600: 禁言6小时
43200: 禁言12小时
-1: 永久禁言

机器人需要在该群聊中,且拥有允许禁言用户权限(allowGagMember = 1)

字段类型说明
codeint响应代码
msgstring响应信息,包括异常信息
dataObject返回数据
{
"code": 1,
"msg": "success",
"data": {}
}
错误码说明
1002参数缺失或有误
1003未授权(非法token)
-1业务错误(如机器人不在群中、无权限等)