title: Google Drive SDK - Java sample not working
body: <p>I'm trying to get familiar with the Google Drive API using the official Java sample. However, after wasting a few hours and attempting to set the sample up two times, I'm still not able to use it as expected.</p>
  
  <p>Instead of displaying a file's content it throws a 404 error in the FileServlet (/svc path). More specifically, <code>service.files().get(fileId).execute();</code> seems to return null. I've tried it with different files, different MIME types, directly from Google Drive as well as using the Google File Picker.</p>
  
  <p>I've followed the steps described over at <a href="https://developers.google.com/drive/examples/java" rel="nofollow">https://developers.google.com/drive/examples/java</a> as closely as possible.</p>
  
  <p>Has anyone been able to get the sample running?</p>
  
  <p><strong>edit:</strong>
  Here's the log output of the FileServlet when requesting the URL <code>/svc?file_id=0B08R9MrOE-ejZTY2M2I5MjAtYmVjZS00OTkyLWI4ZTEtOTg4OGM3YTIxMWEw</code> (the 404 error is thrown at line 78):</p>
  
  <pre><code>2012-04-26 08:21:36.077
  com.google.api.client.http.HttpRequest execute: -------------- REQUEST  --------------
  GET https://www.googleapis.com/drive/v1/files/0B08R9MrOE-ejZTY2M2I5MjAtYmVjZS00OTkyLWI4ZTEtOTg4OGM3YTIxMWEw
  Accept-Encoding: gzip
  User-Agent: Google-HTTP-Java-Client/1.8.3-beta (gzip)
  
  D 2012-04-26 08:21:36.263
  com.google.api.client.http.HttpResponse &lt;init&gt;: -------------- RESPONSE --------------
  403 OK
  content-type: application/json; charset=UTF-8
  content-encoding: gzip
  date: Thu
  date: 26 Apr 2012 06:21:36 GMT
  expires: Thu
  expires: 26 Apr 2012 06:21:36 GMT
  cache-control: private
  cache-control: max-age=0
  x-content-type-options: nosniff
  x-frame-options: SAMEORIGIN
  x-xss-protection: 1; mode=block
  content-length: 188
  server: GSE
  x-google-cache-control: remote-fetch
  via: HTTP/1.1 GWA
  
  D 2012-04-26 08:21:36.265
  com.google.api.client.http.HttpResponse getContent: Response size: 188 bytes
  D 2012-04-26 08:21:36.271
  com.google.api.client.http.HttpResponse getContent: {
   "error": {
    "errors": [
     {
      "domain": "usageLimits",
      "reason": "dailyLimitExceededUnreg",
      "message": "Daily Limit Exceeded. Please sign up",
      "extendedHelp": "https://code.google.com/apis/console"
     }
    ],
    "code": 403,
    "message": "Daily Limit Exceeded. Please sign up"
   }
  }
  </code></pre>
  
  <p>This sounds a lot like "I don't know you" to me, so I have taken another look at my Client ID and Client Secret: I've noticed that there are two Client IDs and Client Secrets being displayed in the API Console, one "Client ID for web applications" and another "Client ID for Drive SDK". I've used the one for web applications previously, so I tried to switch to the one for the Drive SDK. Unfortunately, this doesn't change anything. Same error... :/</p>