APPIDwx778804e73c086080
<?php
获取$access_token正常
url="https://api.weixin.qq.com/card/invoice/seturl?access_token=".$access_token;
$jsonStr='{}';
http_post_num($url, $jsonStr)
function http_post_num($url, $jsonStr)
{
$ch = curl_init();
$header =array("Content-type:application/json;charset='utf-8'","Accept:application/json");
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER,$header);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);
return $response;
}
?>
{"errcode":48001,"errmsg":"api unauthorized hint: [ng2eIA0962ld64]"}
你好,这个接口https://api.weixin.qq.com/card/invoice/seturl?access_token能否补充下文档地址