title: Error 403 Forbidden (insufficient permission) with Google Cloud Storage JSON API Java example
body: <p>I am trying <a href="https://cloud.google.com/storage/docs/json_api/v1/json-api-java-samples" rel="nofollow">this example</a> from Google, showing "how you can use the Google APIs Client Library for Java to send requests to the Google Cloud Storage JSON API", which lists the content of one bucket. The only difference is that I am using Eclipse (with Maven) on Linux instead of Maven directly. I keep getting the following error message, generated by the line <code>Bucket bucket = getBucket.execute();</code>:</p>
  
  <blockquote>
    <p>403 Forbidden
    {
     "code" : 403,
     "errors" : [ {
       "domain" : "global",
       "message" : "Insufficient Permission",
       "reason" : "insufficientPermissions"
     } ],
     "message" : "Insufficient Permission"
    }</p>
  </blockquote>
  
  <p>However, I have read/write access to the project, I am able to inspect the buckets through the developers console and I have been able to access BigQuery through the Java API (although I'm also running into some strange behaviour there, I can detail if necessary). My ultimate goal is to write a script that loads new Datastore backups into BigQuery every day.</p>
  
  <p>Can anyone confirm that the example from Google is working for them?</p>
  
  <p>EDIT: I should add that I have no trouble using the 'APIs exporer' <a href="https://cloud.google.com/storage/docs/json_api/v1/buckets/list" rel="nofollow">here</a>.</p>