changingshow1
V2EX  ›  微信

第三方平台代公众号发起网页授权, component_access_token 偶尔会过期?

  •  
  •   changingshow1 · Nov 13, 2020 · 1403 views
    This topic created in 2014 days ago, the information mentioned may be changed or developed.
    第三方平台代公众号发起网页授权,用 code 和 component_access_token 获取 access_token,连接如下

    https://api.weixin.qq.com/sns/oauth2/component/access_token?appid=APPID&code=CODE&grant_type=authorization_code&component_appid=COMPONENT_APPID&component_access_token=COMPONENT_ACCESS_TOKEN
    接口返回{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest, hints: [ req_id: diBfIfMre-Ptnica ]"},然后同样的 component_access_token,下一次就可以正常请求了,这是什么原因,component_access_token 做了缓存处理,如果过期了,第二次也应该不会成功啊,怎么会一会过期,一会有好了呢?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2999 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 12:24 · PVG 20:24 · LAX 05:24 · JFK 08:24
    ♥ Do have faith in what you're doing.