https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html
通过code换取网页授权access_token,这个接口有并发限制吗?Exchange code for webpage authorization access_token. Does this interface have concurrency restrictions?
通过code换取网页授权access_token,这个接口有并发限制吗?https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html
回答:
建议自行做好access_token的缓存机制,固定周期(2小时以内)获取一次,因为每次获取新的access_token上一次获取的最多只有5分钟的有效期,而且你高并发获取的access_token会出现大量access_token失效。
什么情况下需要并发?
1、思路错误。
这个接口永远不应该有并发。第一个调用后保存下来,接下来999个用户直接读这个值。