V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
changingshow1
V2EX  ›  微信

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

  •  
  •   changingshow1 · 2020-11-13 17:57:32 +08:00 · 856 次点击
    这是一个创建于 1231 天前的主题,其中的信息可能已经有所发展或是发生改变。
    第三方平台代公众号发起网页授权,用 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 做了缓存处理,如果过期了,第二次也应该不会成功啊,怎么会一会过期,一会有好了呢?
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3076 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:32 · PVG 22:32 · LAX 07:32 · JFK 10:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.