Android: Google Authentication + Ubertoken
Ok, I give up. Anyone have experience using Google's IssueAuthToken and
MergeSession to authenticate with certain Google services that do not have
official API access? In this case I'm trying to get Google bookmarks (from
google.com/bookmarks).
I get the SID and LSID using getAuthToken and that works fine. I then call
Uri ISSUE_AUTH_TOKEN_URL =
Uri.parse("https://accounts.google.com/IssueAuthToken?service=bookmarks&Session=false");
String url = ISSUE_AUTH_TOKEN_URL.buildUpon()
.appendQueryParameter("SID", sid)
.appendQueryParameter("LSID", lsid)
.build().toString();
I receive the "ubertoken".
I then do a GET to MergeSession and that's where it all goes wrong:
String url2 =
"https://accounts.google.com/MergeSession?source=chrome&uberauth="+uberToken+"&service=bookmarks&continue=https%3A%2F%2Fwww.google.com%2Fbookmarks%2F";
HttpGet getCookies = new HttpGet(url2);
Looking through the headers of getCookies I am not seeing the extra
cookies I should see, and I also see things like X-Frame-Options: DENY.
Help (please)!
No comments:
Post a Comment