android - "Token expired" Obtaining Google Auth Token -
i'm getting following error when trying google auth token using
accountmanagerfuture<bundle> amf = am.getauthtoken( accounts[0], "finance", null, activity[0], null, null ); try { auth_token = amf.getresult().getstring("authtoken"); log.v("portfolio", "getting token...: "+auth_token); } catch (exception e) { e.printstacktrace(); }
i valid-looking token, when try , use it, "token expired" error back:
v/portfolio(11970): <html> v/portfolio(11970): <head> v/portfolio(11970): <title>token expired</title> v/portfolio(11970): </head> v/portfolio(11970): <body bgcolor="#ffffff" text="#000000"> v/portfolio(11970): <h1>token expired</h1> v/portfolio(11970): <h2>error 401</h2> v/portfolio(11970): </body> v/portfolio(11970): </html>
along with:
w/defaultrequestdirector(11970): authentication error: unable respond of these challenges: {googlelogin=www-authenticate: googlelogin realm="http://www.google.com/accounts/clientlogin", service="finance"}
i'm little confused why happening, working before. how "non-expired" token? i'm doing terribly wrong. if has link proper auth token tutorial, too.
looks need use invalidateauthtoken()
.
Comments
Post a Comment