component_appid=wx56c62aa327157fb0
三方平台代公众号发起网页授权问题,获取accesstoken的时候报{\"errcode\":40001,\"errmsg\":\"invalid credential, access_token is invalid or not latest, rid: 66e55c80-6f808a57-63c10317\"}
第一步:获取code正常获取到了
第二步:获取access_token报错,请求和出参如下:
https://api.weixin.qq.com/sns/oauth2/component/access_token?appid=wx35b4d488049170b3&code=071Oa1ll2sQH9e4zTFml2KK9Xu3Oa1lm&grant_type=authorization_code&component_appid=wx56c62aa327157fb0&component_access_token=component_access_token
component_access_token是对的,因为我用这个component_access_token是可以获取到authorizer_access_token的
出参如下:{"body":"{\"errcode\":40001,\"errmsg\":\"invalid credential, access_token is invalid or not latest, rid: 66e55c80-6f808a57-63c10317\"}","headers":{"Connection":["keep-alive"],"Date":["Sat, 14 Sep 2024 09:50:56 GMT"],"Content-Type":["application/json; encoding=utf-8"],"RetKey":["11"],"LogicRet":["40001"],"Content-Length":["119"]},"statusCode":"OK","statusCodeValue":200}
实在不知道哪儿出了问题,望大佬帮忙看下
我这个component_access_token应该是有效的,因为调用这个接口是正常返回的https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token?component_access_token=
但是调这个接口就说token无效了 https://api.weixin.qq.com/sns/oauth2/component/access_token?appid=wx35b4d488049170b3&code=xxxx&grant_type=authorization_code&component_appid=wx56c62aa327157fb0&component_access_token=
仔细检查下每个步骤的appid和appsecret是否对应