Wednesday, October 5, 2011

[android-developers] AccountManager "wrong password or account changed" error

This is a reply to:
http://groups.google.com/group/android-developers/browse_thread/thread/d66ff537b04ec9a8

(which is closed for replies).

I had the same issue when trying to develop an app that authenticates
with the Google Docs List API.
My AccountManager.blockingGetAuthToken(account, AUTH_TOKEN_TYPE, true)
call would cause a notification bar warning to appear that said
something like "Sign-in error..." and then asked me to re-enter the
password.

The solution turned out to be correcting the AUTH_TOKEN_TYPE string.
After I set it to "writely" (based on the table from
http://code.google.com/apis/gdata/faq.html#clientlogin), everything
worked.

The table is copy-pasted below in case that page goes away:


A "service name" is a brief string that the ClientLogin authentication
system uses to identify a Google service.
Google Analytics Data APIs analytics
Google Apps APIs (Domain Information & Management) apps
Google Base Data API gbase
Google Sites Data API jotspot
Blogger Data API blogger
Book Search Data API print
Calendar Data API cl
Google Code Search Data API codesearch
Contacts Data API cp
Documents List Data API writely
Finance Data API finance
Gmail Atom feed mail
Health Data API health weaver (H9 sandbox)
Maps Data APIs local
Picasa Web Albums Data API lh2
Sidewiki Data API annotateweb
Spreadsheets Data API wise
Webmaster Tools API sitemaps
YouTube Data API youtube

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate