这个接口只能是用API创建的小程序才能使用
getaccountbasicinfo调用权限问题?https://api.weixin.qq.com/cgi-bin/account/getaccountbasicinfo?access_token=ACCESS_TOKEN 该接口调用,返回 {"errcode":48001,"errmsg":"api unauthorized hints: [4hACBMnre-IJw!]"} 我在这边帖子看到的情况【https://developers.weixin.qq.com/community/develop/doc/0000a0af6e09c869f9e8d859d56400】 说是只有通过API创建的小程序才能够调用API。 那么请问下官方,第三方平台->代小程序实现业务->基础信息设置,该栏下的所有API,只有通过API创建的小程序才能够调用呢
2020-06-20我最后找到了原因,guzzlehttp提交json的时候,会把中文编码成unicode,这样是不行的,需要这样 $body=json_encode($params,JSON_UNESCAPED_UNICODE);
文本安全内容检测接口的接口,不管传多么违规的内容,都可以通过?不管传什么样的内容接口都可以通过,都返回的是,{"errcode":0,"errmsg":"ok"},具体代码入下,access_token肯定没错,因为请求结果返回的是{"errcode":0,"errmsg":"ok"} public function checkContent($content){ $url='https://api.weixin.qq.com/wxa/msg_sec_check?access_token='.$this->getAccessToken(); $client=new Client(); $response=$client->request("POST",$url,[ "json"=>[ "content"=>$content ] ]); $contents = $response->getBody()->getContents(); \Yii::error($contents,"error"); $result=json_decode($contents,true); if($result['errcode']==87014){ return false; } return true; }
2020-05-26