你好,我这边开发请求接口遇到了问题,如下
==========================================================================================
请求一下接口时,body里面的json参数没有问题但是一直返回“Warning: wrong json format”
https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_contact_way?access_token={这里是accessToken}
第一这种情况
{"is_temp":"true","scene":2,"type":1,"user":["SanWan"]}
请求失败
{"errcode":40058,"errmsg":"Warning: wrong json format. Invalid input invalid Request Parameter, hint: [1600050101_106_3cae74fbf45fb6bd7be2d0d7e0899193], from ip: , more info at https://open.work.weixin.qq.com/devtool/query?e=40058"}
第二种情况
{
"is_temp":"true",
"scene":2,
"type":1,
"user":[
"SanWan"
]
}
请求失败
{"errcode":40058,"errmsg":"Warning: wrong json format. Invalid input invalid Request Parameter, hint: [1600050169_106_e2a7a442159bcba5adb9d4209f6dc9f9], from ip: , more info at https://open.work.weixin.qq.com/devtool/query?e=40058"}
第三种情况
{
"type": 1,
"scene": 2,
"is_temp": "true",
"user": ["SanWan"]
}
请求失败
"errmsg": "Warning: wrong json format. user & party & tag all empty, hint: [1600050311_98_8cc24cfc198289ddf9a5ddc0d87870e6], from ip: 175.6.23.60, more info at https://open.work.weixin.qq.com/devtool/query?e=81012"
第四种情况
{
"type": 1,
"scene": 2,
"user": ["SanWan"],
"is_temp": "true"
}
请求成功
==========================================================================================
您好,第一第二个没有日志,第三个Req {"type":1,"scene":2,"user":[],"party":[]} 看日志是请求的userid列表为空,感觉是is_temp 字段阻断了其他几个字段,第一第二个应该也是一样,我确认下这里的逻辑是怎样的
还有就是这个和参数顺序用也有关系,【【希望官方尽快优化一下】】
{"scene":2,"type":1,"user":["SanWan"],"is_temp":"true"}请求成功
{"is_temp":"true","scene":2,"type":1,"user":["SanWan"]}请求失败
目前还是这样就这一种格式能请求成功