接口:
获取预授权码pre_auth_code
该API用于获取预授权码。[51 微信小程序]微信小程序提交审核迟迟不通过#微信小程序开发。预授权码用于公众号或微信小程序授权时的第三方平台方安全验证。
接口调用请求说明
http请求方式: POST(请使用https协议)https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode?component_access_token=xxxPOST数据示例:
{"component_appid":"appid_value" }请求参数说明
参数说明
component_appid第三方平台方appid
代码:
$component_access_token = $this->getComponentAccessToken();$url = "https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode?component_access_token=" . $component_access_token;$data = json_encode(array('component_appid' => $this->_component_appid));$ret = json_decode($this->_curlPost($url, $data), true);//getComponentAccessToken方法获取access_token
报错:
41001
access_token missing hint: [B9NgFA0627vr30]
请问有遇到这个问题的吗?
已确定获取成功access_token
微信小程序开发相关问题解答;本文来自微信小程序工厂 http://www.xcxgc.com 转载请保留。
本文网址:http://www.91bianli.com/kaifazhinan/63374.html