首先第三方平台用该链接生成授权二维码,用户扫码后,跳转到后台,
https://open.weixin.qq.com/connect/oauth2/authorize
?appid=wx52c89e6ce1b023c0
&redirect_uri=http://www.XXXX.com/getWxInfo
&response_type=code
&scope=snsapi_userinfo&state=124
&component_appid=wx87a76458ca39c71e
用code 去请求openid的时候报错
https:
?appid=wx52c89e6ce1b023c0
&code=011GAy000m3yCM1EAU000x9dbs2GAy02
&grant_type=authorization_code
&component_appid=wx87a76458ca39c71e
&component_access_token=50_UCH8BUyi5wonOBQ8kSbvoW9PbnVMRtv9ln7GnDATe9.....
2021-10-20 15:08:18.487 {"errcode":40029,"errmsg":"invalid code, rid: 616fc062-2f50c85f-61b4bc04"}
你好,请参考文档https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/Before_Develop/Official_Accounts/official_account_website_authorization.html重新获取code后,重试下