title: Unable to authenticate with Google through the Java SDK for reading spreadsheet data
body: <p>When I try to authenticate with Google it throws an exception during authenticating (check service name).</p>
  
  <p>I used the Google Java SDK for authenticating.</p>
  
  <pre><code>SpreadsheetService service = new SpreadsheetService("Print Google Spreadsheet Demo");   //this is my application name that i created in developer console
              service.setUserCredentials(MY_GOOGLE_EMAIL_ADDRESS, GOOGLE_ACCOUNT_PASSWORD);
  
          // Load sheet
          URL metafeedUrl = new URL(SPREADSHEET_URL);
          SpreadsheetEntry spreadsheet = service.getEntry(metafeedUrl, SpreadsheetEntry.class);
          URL listFeedUrl = ((WorksheetEntry) spreadsheet.getWorksheets().get(0)).getListFeedUrl();
  
          // Print entries
          ListFeed feed = (ListFeed) service.getFeed(listFeedUrl, ListFeed.class);
  </code></pre>
  
  <p>The exception was thrown in the <code>setUserCredentials()</code> method.</p>
  
  <p>Exception:</p>
  
  <pre><code>com.google.gdata.util.AuthenticationException: Error authenticating (check service name)
      at com.google.gdata.client.GoogleAuthTokenFactory.getAuthException(GoogleAuthTokenFactory.java:628)
      at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:500)
      at com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:346)
      at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:362)
      at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:317)
      at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:301)
  </code></pre>
  
  <p>Is there any configuration I missed before accessing the Google spreadsheet?</p>