请问小程序与开放平台Oatuth接口能共用吗?

发布于 6 年前作者 bzhu8685 次浏览最后编辑 6 年前来自 ask

wx.login 获取的code

后端Server请求 https://api.weixin.qq.com/sns/oauth2/access\_token?appid=xxxx&secret=xxxx&code=013PMxKn0VK0qq1XbpKn0O0IKn0PMxKG&grant\_type=authorization\_code

再次请求,https://api.weixin.qq.com/sns/userinfo?access\_token结果为

{"errcode":48001,"errmsg":"api unauthorized, hints: [ req_id: JXXZKA0329s162 ]"}

请问小程序与开放平台Oatuth接口能共用吗?

1 回复
yonghuang
yonghuang1 楼4 年前

必须要用户点击授权使用才可以