Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccessToken Expired Error Code #163

Closed
palmtale opened this issue Nov 23, 2015 · 10 comments
Closed

AccessToken Expired Error Code #163

palmtale opened this issue Nov 23, 2015 · 10 comments

Comments

@palmtale
Copy link

Could you please update the AccessToken Expired ErrorCode from 40001 to 42001.
Check the global return code here: http://mp.weixin.qq.com/wiki/17/fa4e1434e57290788bde25603fa2fcbd.html
As the doc said, 40001 is for error appSecret, so, it would make nothing better after retring.

@palmtale
Copy link
Author

In overtrue/wechat/src/Wechat/Http.php

@overtrue
Copy link
Collaborator

@palmtale 我是中国人,可以用中文。

40001:获取access_token时AppSecret错误,或者access_token无效。请开发者认真比对AppSecret的正确性,或查看是否正在为恰当的公众号调用接口
42001:不合法的凭证类型

这俩其实不一样,第一个是token无效,第二个是appid与appsecret不正确的意思吧(我的理解)

@palmtale
Copy link
Author

我知道你是中国人呀。咱这不用老外的破玩儿意儿么。 不过,安正超像是韩国名儿。
那请看我下文的两句log(发生的情景就是:本来是有效的,过长时间后抛这个错啊):
[2015-11-16 12:13:14] local.ERROR: Push job crashed. {0} ["(Overtrue\Wechat\Exception(code: 42001): [Wechat]access_token超时,请检查access_token的有效期,
请参考基础支持-获取access_token中,对access_token的详细机制说明 at /home/urbem/sites/vendor/overtrue/wechat/src/Wechat/Http.php:115)"]
[2015-11-16 12:13:17] local.ERROR: Push job crashed. {0} ["(Overtrue\Wechat\Exception(code: 42001): [Wechat]access_token超时,请检查access_token的有效期,
请参考基础支持-获取access_token中,对access_token的详细机制说明 at /home/urbem/sites/vendor/overtrue/wechat/src/Wechat/Http.php:115)"]

@overtrue
Copy link
Collaborator

哈哈,你的报错没提供任何有效的信息哦

@palmtale
Copy link
Author

再看下,是github对 中括号有转译。 上文双引号和左括号间是有个 中括号括着object的
@overtrue 你看串行了
40001 获取access_token时AppSecret错误,或者access_token无效。请开发者认真比对AppSecret的正确性,或查看是否正在为恰当的公众号调用接口
40002 不合法的凭证类型
42001 access_token超时,请检查access_token的有效期,请参考基础支持-获取access_token中,对access_token的详细机制说明

@overtrue
Copy link
Collaborator

@palmtale 我是从他们的文档贴过来的,证明他们的代码里报的与文档不一样

@palmtale
Copy link
Author

@overtrue 哦,看来得实测确定下。

overtrue added a commit that referenced this issue Nov 23, 2015
@overtrue
Copy link
Collaborator

@palmtale
Copy link
Author

谢谢。
其实已经自己先改后发布,但毕竟改第三方库我得自己维护,所以还是来这给你提bug了。

@overtrue
Copy link
Collaborator

@palmtale 感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants