{"errcode":48001,"errmsg":"api unauthorized, hints: [ req_id: UFCedzXBe-oz3T1a ]"}
// 链接不对 会报上面的错误
1 小程序 根据 code换取openid
调用url 链接
https://api.weixin.qq.com/sns/jscode2session?appid=$appid&secret=$appsecret&js_code=$code&grant_type=authorization_code
2 微信公众号 code 换取openid
调用url 链接
https://api.weixin.qq.com/sns/oauth2/access_token?appid=$appid&secret=$appsecret&code=$code&grant_type=authorization_code;
还有一种 不知道用在什么场景https://api.weixin.qq.com/sns/oauth2/component/access_tokenappid=$appid&secret=$appsecret&code=$code&grant_type=authorization_code;