Google Reader API 请求令牌,得到 400:Bad Request
这段 Android 代码以前工作得很好,但由于某种原因我遇到了问题。这是我试图提出的请求:
https://www.google.com /reader/api/0/token
我收到 400:Bad Request 作为响应,我不知道为什么。这不是请求令牌的正确 URL 吗?现在,身份验证令牌作为标头在所有请求中传递,我可以请求提要列表,并且它工作得很好,因此身份验证代码没有任何问题。什么给了?
此外,我可以在普通浏览器(例如 Chrome)中请求令牌,并获取令牌作为响应正文。所以请求本身不是问题。我只是无法弄清楚我的代码请求有什么问题......
this Android code worked fine before, but i'm having problems for some reason. here is the request i'm trying to make:
https://www.google.com/reader/api/0/token
i'm getting 400:Bad Request as a response, and i'm not sure why. isn't this the correct URL for requesting a token? the auth token is being passed as a header in all requests now, and i can request feed list, and it works just fine, so there's nothing wrong with the auth code. what gives?
in addition, i can request a token in a normal browser, like Chrome, and get a token as a response body. so the request itself is not the problem. i just can't figure out what is wrong with my requests in code...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案是使用 http 而不是 https。如果其他人在从非官方 google reader api 获取令牌时遇到问题,请检查您是否使用安全 http。
the answer is to use http rather than https. if anyone else is having trouble getting tokens from the unofficial google reader api, check whether you are using secure http or not.