# 修改好友备注

[异步回调]修改好友备注

机器人通过调用接口修改好友的备注信息,此处好友包括企业好友和客户好友。

请求方式:POST

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

body参数

{
    "robot_id": "机器人id",
    "alias": "好友备注名称",
    "description": "好友描述",
    "contact_id": "好友id"
}
字段 类型 必填 说明
robot_id string 机器人id
contact_id string 好友id
alias string 好友备注名称
description string 好友描述

返回值:

{
    "data": {
        "serial_no": "xxxxxx"
    },
    "errcode": 0,
    "errmsg": "",
    "hint": ""
}

返回说明

字段 类型 说明
errcode int 状态码,0为正常,非0代表错误
errmsg string 错误信息
data json json返回值
   serial_no string 请求序列号
hint string 请求日志ID

处理结果,异步返回值:

{
    "event_type": 200012,
    "serial_no": "操作序列号",
    "err_code": 0,
    "err_msg": "success",
    "robot_id": "机器人id",
    "data": {
      "contact_id": "修改备注的好友id",
      "alias": "传入的好友备注",
      "description": "传入的好友描述"
    }
}

返回说明

字段 类型 说明
event_type int 事件类型,200012
serial_no string 操作序列号
err_code int 状态码,0为正常,非0代表错误
err_msg string 错误信息
robot_id string 机器人id
data object 返回数据
data.contact_id string 修改备注的好友id
data.alias string 传入的好友备注
data.description string 传入的好友描述

完整请求示例:

curl -X POST \
  https://$basehost/gateway/qopen/SetFriendRemark \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
  -d '{
    "robot_id": "机器人id",
    "alias": "好友备注",
    "description": "好友描述",
    "contact_id": "好友id"
}'
最后更新时间: 2023/5/24 10:48:59