从 Google Reader API 收到 400 客户端错误(特别是用户授权的编辑/删除)

发布于 2024-10-04 00:21:11 字数 1409 浏览 4 评论 0原文

我一直在尝试为我半年多前写的iPhone修复一个谷歌阅读器客户端,该客户端在谷歌六月份更改了谷歌阅读器的身份验证方案后就崩溃了。我目前在项目、提要和文件夹的编辑/删除功能方面遇到了障碍......

www.google.com/reader/api/0/subscription/edit

www.google.com/reader/api/0/edit-tag

www.google.com/reader/api/0/mark-all-as-read

www.google.com/reader/api/0/disable-tag

www.google.com/reader/api/0/item/edit

www.google.com/reader/api/0/item/delete

对上述接口发出的请求所有这些都会导致 400 Bad Request 错误。检查我的请求的响应头,我发现原因是一个错误的令牌。

"Cache-Control" = "无缓存,无存储, max-age=0,必须重新验证”; “内容长度”= 1334; “内容类型”=“文本/html; 字符集 = UTF-8"; 日期 = "11 月 25 日星期四 2010 09:51:08 GMT”;过期 =“星期五,01 1990 年 1 月 00:00:00 GMT";Pragma = “无缓存”;服务器=GSE; “X-Content-Type-Options”= nosniff; “X 框架选项”= SAMEORIGIN; “X-Reader-Google-Bad-Token”= true; “X-Reader-Google-版本”=“521-000”; “X-读者-用户”= 05659401224324679732; "X-Xss-Protection" = "1; mode=block";

这是有道理的,因为上述 API 是唯一需要您从中获取令牌的 API www.google.com/reader/api/0/token

这是我正在使用的令牌之一的示例: tpMLOEjtCjn2zzb6Gg2IYw

现在,在 6 月之前,上述功能正在运行,因此我的令牌获取一定是正确的。我目前正在使用相同的端点并获得响应,所以看起来没问题,尽管考虑到 SID 和身份验证令牌的长度,我返回的令牌似乎很短(我不记得令牌是否六月之前就这么短)。不可能过期,因为即使我再次登录并重新获取新令牌,也会遇到相同的错误。我已经确保我的令牌字符串中没有任何空格,所以也不可能是这样。

有谁知道我可能做错了什么?我在网上其他地方找不到相关的任何其他信息,除了关于同一主题的未答复的帖子,该帖子推测可能需要 HSID 字符串以及 cookie 中的 SID。

I've been trying to fix a google reader client for the iphone I wrote more than half a year ago, which broke after Google changed its authentication scheme for google reader in June. I've currently hit a roadblock with edit/delete functionality for items, feeds and folders...

www.google.com/reader/api/0/subscription/edit

www.google.com/reader/api/0/edit-tag

www.google.com/reader/api/0/mark-all-as-read

www.google.com/reader/api/0/disable-tag

www.google.com/reader/api/0/item/edit

www.google.com/reader/api/0/item/delete

Requests made to the above interfaces all result in 400 Bad Request errors. Checking the response heads for my requests, I see that the reason is a bad token.

"Cache-Control" = "no-cache, no-store,
max-age=0, must-revalidate";
"Content-Length" = 1334;
"Content-Type" = "text/html;
charset=UTF-8"; Date = "Thu, 25 Nov
2010 09:51:08 GMT"; Expires = "Fri, 01
Jan 1990 00:00:00 GMT"; Pragma =
"no-cache"; Server = GSE;
"X-Content-Type-Options" = nosniff;
"X-Frame-Options" = SAMEORIGIN;
"X-Reader-Google-Bad-Token" = true;
"X-Reader-Google-Version" = "521-000";
"X-Reader-User" =
05659401224324679732;
"X-Xss-Protection" = "1; mode=block";

This makes sense, as the above API are the only ones that require the token you get from
www.google.com/reader/api/0/token

Here's a sample of one of the tokens I'm using:
tpMLOEjtCjn2zzb6Gg2IYw

Now, prior to June the above functionality was working, so the my token acquirement must have been correct. I'm currently using the same endpoint and getting a response, so it seems to be ok, although the token I'm getting back seems suspiciously short, given how long the SID and auth tokens are (I can't recall whether the token was this short prior to June). Expiry is not a possibility, since I get the same error even when I log-in again and reacquire a new token. I've made sure that aren't any whitespaces in my token string, so it can't be that either.

Does anyone have any idea what I could be doing wrong? I haven't been able to find any other info elsewhere online regarding, except for an unanswered post on the same topic that speculated that an HSID string might be required along with the SID in the cookie.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水晶透心 2024-10-11 00:21:11

Google 不再接受 SID cookie。您现在需要将身份验证作为 http 标头传递。
另一个问题的答案可能会有所帮助,Google Reader API?

Google no longer accepts the SID cookie. You now need to pass the Auth as an http header.
This answer from another question might help, Google Reader API?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文