Hmm.  The default for setUserCredentials(username, password) is
HOSTED_OR_GOOGLE, which should be fine.

Can you email me privately the value you're using for username?  I'm unaware
of a way to reproduce what you've described without either a) not providing
a valid email address as username, or b) not providing a valid password.

-Vic



On Wed, Mar 2, 2011 at 9:36 AM, Sarath K S <[email protected]> wrote:

> Hi,
>
> I tried that too, but the same exception.
>
> com.google.gdata.client.GoogleService$InvalidCredentialsException:
> Invalid credentials
>        at
>
> com.google.gdata.client.GoogleAuthTokenFactory.getAuthException(GoogleAuthTokenFactory.java:
> 586)
>        at
>
> com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:
> 490)
>        at
>
> com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:
> 336)
>        at
>
> com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:
> 362)
>        at
>
> com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:
> 317)
>        at com.cordys.uc.webapps.uimodeler.mtor.Test.main(Test.java:18)
>
> Thanks & Regards,
> Sarath
>
> On Mar 2, 7:07 pm, hitoshi uchida <[email protected]> wrote:
> > Hi,
> > Could you retry with setUserCredentials(String username, String
> > password, ClientLoginAccountType accountType) ? The accountType is
> > ClientLoginAccountType.HOSTED.
> >
> > On 3月1ζ—₯, 午後8:21, Sarath K S <[email protected]> wrote:
> >
> > > import com.google.gdata.client.spreadsheet.SpreadsheetService;
> >
> > > public class Test {
> > >         public static void main(String[] args) {
> > >                 try {
> > >                         SpreadsheetService service = new
> > > SpreadsheetService("MySpreadsheetService");
> > >                         service.setUserCredentials("username@mydomain",
> "password");
> > >                 } catch (Exception e) {
> > >                         e.printStackTrace();
> > >                 }
> > >         }
> >
> > > }
> >
> > > This code is throwing me invalid credentials exceptions, but the
> > > credentials I have used are valid.
> >
> > > Can you please help me identify whats the issue?
> >
> > > Thanks & Regards,
> > > Sarath
>

Reply via email to