# 保存群到通讯录
请求方式:POST
请求地址:https://$basehost/gateway/qopen/SetGroupCollect
body参数:
{
"robot_id": "机器人id",
"group_id": "群openid",
"set_type": 1
}
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| robot_id | string | 是 | 机器人 |
| group_id | string | 是 | 群id |
| set_type | int | 是 | 1:保存, 2:取消保存 |
返回值:
{
"errcode": 0,
"errmsg": "",
"data": {
}
}
| 字段 | 类型 | 说明 |
|---|---|---|
| errcode | int | 错误码 |
| errmsg | string | 错误描述 |
完整请求示例:
curl -X POST \
https://$basehost/gateway/qopen/SetGroupCollect \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
-d '{
"robot_id": "机器人id",
"group_id": "群openid",
"set_type": 1
}'