# 获取机器人开关状态

商家通过调用“获取机器人开关状态接口”这个接口可以获取到指定机器人好友验证、自动通过好友验证、自动通过群聊邀请开关的状态。

请求方式:POST

请求地址:https://$basehost/gateway/qopen/GetRobotConfigSync

body参数

{
    "robot_id_list": ["机器人id"]
}
字段 类型 必填 说明
robot_id_list array 机器人id列表,不可传空,最多支持传入100个

返回说明

{
    "data": {
      "config_list": [
        {
          "robot_id": "机器人id", 
          "switch_add_verification": 0,
          "auto_accept_customer": true,
          "auto_join_group": true
        }
      ],
      "failed_list": []
    },
    "errcode": 0,
    "errmsg": "",
    "hint": ""
}

返回说明

字段 类型 说明
data object 返回数据
   config_list array 机器人开关列表
     robot_id string 机器人id
     switch_add_verification int 好友验证开关: -1未知,1开启,0关闭
     auto_accept_customer bool 是否设置自动通过好友请求:true是,false否
     auto_join_group bool 是否自动加入群聊:true是,false否
   failed_list list 无效id列表
errcode int 状态码,0为正常,非0代表错误
errmsg string 错误信息
hint string 请求日志ID

完整请求示例:

curl -X POST \
  https://$basehost/gateway/qopen/GetRobotConfig \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
  -d '{"robot_id_list": ["机器人id"]}'
最后更新时间: 2023/5/24 10:48:59