接口:

获取预授权码pre_auth_code

该API用于获取预授权码。预授权码用于公众号或小程序授权时的第三方平台方安全验证。

接口调用请求说明
http请求方式: POST(请使用https协议)
https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode?component_access_token=xxx

POST数据示例:

{
"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

展开全部
收起
1回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • Genesis

    8人对此回答表示赞同

    请问是怎么解决的?

    展开
    8
    0回复
    发布于 6年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部