【请求参数】:{"sceneDesc":"作业通知,,,","kidList":[5,11,2,9,7],"tid":"632"}
【错误信息】:{"errmsg":"missing parameter tid","errcode":200014}]
请求时间 2020-01-22 12:04:53
appid: wxeb55733f7a265de7
这个tid,我能查到关键词
【请求参数】:tid=632
【响应数据】:{"data":[{"kid":2,"name":"学生姓名","example":"王一","rule":"name"},{"kid":4,"name":"截止时间","example":"2019-11-01 15:00","rule":"date"},{"kid":5,"name":"课程名称","example":"新概念英语第二册","rule":"thing"},{"kid":6,"name":"完成时间","example":"20:00","rule":"time"},{"kid":7,"name":"备注","example":"成绩进步,再接再厉","rule":"thing"},{"kid":8,"name":"班机名称","example":"小二3班","rule":"thing"},{"kid":9,"name":"作业内容","example":"磨耳朵练习","rule":"thing"},{"kid":10,"name":"科目","example":"一级建造师","rule":"name"},{"kid":11,"name":"发布人","example":"教研组","rule":"name"},{"kid":12,"name":"班级名称","example":"班鸽英语初20190219班","rule":"thing"},{"kid":13,"name":"作业时间","example":"今日7:00-18:00","rule":"thing"},{"kid":14,"name":"发布时间","example":"2019年12月24日","rule":"date"}],"errmsg":"ok","errcode":0}]
查询时间:2020-01-22 12:31:39
请求头改下 Content-Type:application/json 刚刚我也是一直提示错误,看到文档需要请求头这个,改成这样就可以了
我是使用curl 可以参考下
$ch = curl_init();
$url = '请求链接';
$data = json_encode($params,JSON_UNESCAPED_UNICODE);
/*curl_setopt($ch, CURLOPT_POST, 1); 之前我多了这句变成post就不可以了*/
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($ch);
{
"errmsg": "missing parameter kidList",
"errcode": 200020
}
现在又报这个错,参数也传递了,还是不行,服了这个接口了
你好,解决了么,我也是遇到这个问题,参数传递都没问题。。。。