ClientLogin for Picasa Web Albums Data API with a Google App Domain login
        Posted  
        
            by mlsteeves
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by mlsteeves
        
        
        
        Published on 2009-05-19T02:16:48Z
        Indexed on 
            2010/04/23
            10:33 UTC
        
        
        Read the original article
        Hit count: 459
        
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();
        © Stack Overflow or respective owner