小程序ID:wx893969c6db342177
贴代码:
$app_id = $config['app_id'];
$app_secret = $config['app_secret'];
$api = "https://api.weixin.qq.com/sns/jscode2session?appid={$app_id}&secret={$app_secret}&js_code={$js_code}&grant_type=authorization_code";
$res = curl_request($api);//正常
//获取access_token
$tokenresult = curl_request('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $app_id . '&secret=' . $app_secret);//正常
//获取用户信息接口
$users_result = curl_request('https://api.weixin.qq.com/cgi-bin/user/info?access_token=' . $tokenresult['access_token'] . '&openid=' . $res['openid'] . '&lang=zh_CN');//48001报错
打印结果
array(2) {
["errcode"]=>
int(48001)
["errmsg"]=>
string(43) "api unauthorized hints: [.fcFzXyMe-OOIgBA!]"
}
问题:突然不能获取用户信息插入或更新数据库
求助大神爸爸们...
提示的是接口没有权限