Rails 微信的 oauth2,获取 access_token 接口返回空字符串,什么鬼

oldfritter · October 20, 2015 · Last by oldfritter replied at October 20, 2015 · 3153 hits

https://open.weixin.qq.com/sns/oauth2/access_token?appid=wx111111111111&sercet=XXXXXX&code=XXXXXX&grant_type=authorization_code

请求这个接口给我返回了一个#,response 的 body 是空。 初步怀疑是我的 appid 和 sercet 的问题,请教一下有经验的童鞋。

接口地址错了吧?仔细看看域名。

获取 code 后,请求以下链接获取 access_token: https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code

@lbp0200 按照官方的文档上做的,而且第一步的 code 已经取得

3 Floor has deleted

原来是域名变了,感谢 @lbp0200

You need to Sign in before reply, if you don't have an account, please Sign up first.