Google Reader Authentication problem

北慕城南 提交于 2019-11-28 22:04:12

I did it. Yes, the link provided by sfa is right. But the format is sort of too confusing. Here's how I do it.

  1. Post to https://www.google.com/accounts/ClientLogin with login credentials.
  2. In return, three tokens will be passed if correct login: a. SID b. LSID c. Auth
  3. Save the Auth somewhere in application. Forget about SID and LSID (I guess they might remove them later on)
  4. In every request, add following in the header: headername: Authorization value: GoogleLogin auth={Auth string} e.g. (in java)

    HttpGet method = new HttpGet(CommandUrl + QueryString); method.addHeader("Authorization", "GoogleLogin auth=" + Auth);

This works. Thanks sfa for the link.

Hoang Pham

You have to add the Authorization GoogleLogin auth=xxx to your header. Here is the quote from the message:

Here is a quick summary of how to make this change: For those apps that area already obtaining authentication from https://www.google.com/accounts/ClientLogin you should get back as part of your response an Auth= value. For every request you send to Reader you should provide that value as a HTTP header and things will work as usual. The header format is: Authorization:GoogleLogin auth=[value obtained from ClientLogin]

Conferm that it works! I got the same error and already solved the issue. See it here.

See http://code.google.com/p/google-reader-api/wiki/Authentication for details, but briefly, only ClientLogin and OAuth are supported. Please do not continue to simulate the browser flow (with SID and HSID cookies), that is not supported and may break at any point.

Or consider using the ReaderTemplate class offered here: http://github.com/wspringer/greader-java/. It basically hides the complexity of weaving in the appropriate headers and (re)authentication.

when you first login use https://www.google.com/accounts/ServiceLoginAuth . you will get hsid!

i see all google reader api operation use hsid.

i use firebug can see hsid in setCookie field of response

The 4 steps described by xandy are working, thanks.

This is my implementation of xandy's steps in .NET: http://sandrinodimattia.net/blog/post/Consuming-Google-(Reader)-with-NET-Part-1-Authentication.aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!