获取用户信息接口调用异常,大家帮忙看看什么原因?

小程序 文章 2020-09-08 00:01 2561 0 全屏看文

AI助手支持GPT4.0

获取用户信息接口调用异常,大家帮忙看看什么原因?The interface for obtaining user information is abnormal. Can you help us to find out why?

获取用户信息接口调用异常,大家帮忙看看什么原因?
https://api.weixin.qq.com/cgi-bin/user/info?access_token=%s&openid%s&lang=zh_CN调用此接口的token是定时任务不到2小时获取的;偶尔会出现这样的情况:一直返回40001,就是token无效;但是很奇怪的是我排错的时候发现:同一个token连续调用三次,第一次失败,第二次成功,第三次失败。请有类似经历大牛探讨下,谢谢。


 https://api.weixin.qq.com/cgi-bin/user/info?access_ token=%s&openid%s&lang=zh_ Cn calls the token of this interface in less than 2 hours. Occasionally, it returns 40001, which means that the token is invalid. However, it is very strange that I find that the same token is called three times in a row, and the first fails, the second succeeds, and the third fails. Please have similar experience, Daniel. Thank you.

回答:

青寒:

会不会还有其他地方也在请求调用token,造成了冲突?

tomcat:

这个接口是我在服务号网页开发里调用的(因为要判断用户是否关注公众号),大部分时间能调用,但时常调用不了,是不是因为这个不是服务号提供的接口?

Regulus:
同样遇到这个问题,求解答,直接在浏览器里反复刷https://api.weixin.qq.com/cgi-bin/user/info?access_token=%s&openid%s&lang=zh_CN,时而40001,时而是正常的


tomcat:我这边是偶尔成功,偶尔失败

-EOF-

AI助手支持GPT4.0