ClientLogin for Picasa Web Albums Data API with a Google App Domain login
- by mlsteeves
I'm using the Picasa Web Albums Data API to access users' photo albums from a WPF application.
I've followed the code located here:
http://code.google.com/apis/gdata/clientlogin.html
I have created a Picasa Web Albums account with a Google Apps (hosted) account. Whenever I tried logging in with my WPF application, I get the "BadAuthentication" error code returned.
Hoping someone has an idea what I'm doing wrong. Note, that this works when I login with a normal Google account.
Here is a snippet of my code:
GDataGAuthRequestFactory authFactory = new GDataGAuthRequestFactory("lh2", _appName);
authFactory.AccountType = "HOSTED_OR_GOOGLE";
_picasaService = new PicasaService(authFactory.ApplicationName);
_picasaService.RequestFactory = authFactory;
_picasaService.setUserCredentials(username, password);
return _picasaService.QueryAuthenticationToken();