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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -