Skip to content

群内消息类型控制

https://chat-go.jwzhd.com/open-apis/v1/group/msg-type-limit?token=xxxxxxxxxx

POST

curl --location --request POST 'https://chat-go.jwzhd.com/open-apis/v1/group/msg-type-limit?token=xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"groupId": "123456",
"type": "text,image,video"
}'
Content-Type: "application/json; charset=utf-8"
字段类型是否必填说明
groupIdstring群组ID
typestring允许的消息类型,多个类型用逗号分隔。为空表示不限制任何消息类型

type参数为消息类型名称,多个类型用逗号分隔,如:"text,image,video"

为空时表示不限制任何消息类型

类型名称说明
text文本消息
image图片消息
markdownMARKDOWN消息
file文件消息
post帖子消息
expression表情消息
htmlHTML消息
video视频消息
audio语音消息
liveAudio语音通话

机器人需要在该群聊中,且拥有允许修改群信息权限(allowEditGroupInfo = 1)

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