# 获取API加好友明细
请求方式:POST
请求地址:https://$basehost/gateway/qopen/AddExtUserByRuleRecord
body参数:
{
"app_type": 1,
"rule_id": "规则id",
"phone_list": ["电话号码"]
}
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
app_type | int | 是 | 1-扫码号 2-平台号 |
rule_id | string | 是 | 规则id |
phone_list | array | 是 | 需要查询的电话号码,数组长度(1~100) |
返回值:
{
"data": {
"record_list": [
{
"phone": "电话号码",
"friend_profile": {
"name": "好友名称",
"avatar": "好友头像"
},
"robot_profile": {
"name": "机器人名称",
"avatar": "机器人头像"
},
"send_time": 1624633773,
"state": 4,
"validation_message": "验证语",
"remark": "备注"
}
]
},
"errcode": 0,
"errmsg": "",
"hint": ""
}
返回说明
字段 | 类型 | 说明 |
---|---|---|
data | json | json返回值 |
record_list | array | 记录列表 |
phone | string | 电话号码 |
friend_profile | object | 好友信息 |
friend_profile.name | string | 好友名字 |
friend_profile.avatar | string | 好友头像 |
robot_profile | object | 机器人信息 |
robot_profile.name | string | 机器人名称 |
robot_profile.avatar | string | 机器人头像 |
send_time | int | 申请时间 |
state | int | 任务状态, 1-待发送,2-已发送,3-已通过,4-发送失败 |
validation_message | string | 验证语 |
remark | string | 备注,记录失败原因 |
err_code | int | 状态码,0为正常,非0代表错误 |
err_msg | string | 错误信息 |
hint | string | 请求日志ID |
完整请求示例:
curl -X POST \
https://$basehost/gateway/qopen/AddExtUserByRuleRecord \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
-d '{
"app_type": 1,
"rule_id": "规则id",
"phone_list": ["电话号码"]
}'