title: Trying to load data from google storage bucket results in a apiclient.errors.HttpError: <HttpError 403... returned "Forbidden">
body: <p>so right now im trying to write a python script which loads a few files from our google storage. I'm using Windows, have installed the Google Cloud SDK and set everything up with gsutil so i can succesfully load a file in typing the following the the commandline:</p>
  
  <p><code>gsutil cp gs://pubsite_prod_rev_****/financial-stats/subscriptions/***.csv .</code></p>
  
  <p>This loads a correct csv file to my folder. Cool.</p>
  
  <p>Now i tried the same in python, following this documentation from google: <a href="https://support.google.com/googleplay/android-developer/answer/6135870?hl=en" rel="nofollow noreferrer">https://support.google.com/googleplay/android-developer/answer/6135870?hl=en</a> (you have to click on "Download reports using a client library &amp; service account" and then on "Python example" to show the python code)</p>
  
  <p>I used the exact same code </p>
  
  <pre><code>import json
  from httplib2 import Http
  from oauth2client.client import SignedJwtAssertionCredentials
  from apiclient.discovery import build
  from urllib import quote
  
  client_email = 'serviceAccountEmail'
  json_file = 'pathToMyServiceAccountPrivateKey'
  cloud_storage_bucket = 'pubsite_prod_rev_******'
  report_to_download = 'financial-stats/subscriptions/fileName.csv'
  
  print report_to_download
  
  private_key = json.loads(open(json_file).read())['private_key']
  credentials = SignedJwtAssertionCredentials(client_email, private_key, 'https://www.googleapis.com/auth/devstorage.read_only')
  
  storage = build('storage', 'v1', http=credentials.authorize(Http()))
  
  print storage.objects().get(bucket=cloud_storage_bucket, object=report_to_download).execute()
  </code></pre>
  
  <p>to load the csv file.Unfortunetaley this result in the following message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Office/Financial Reports/Python Reporter/Test.py", line 66, in &lt;module&gt;
      print storage.objects().get(bucket=cloud_storage_bucket, object=report_to_download).execute()
    File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\bq\third_party\oauth2client\util.py", line 137, in positional_wrapper
      return wrapped(*args, **kwargs)
    File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\bq\third_party\apiclient\http.py", line 724, in execute
      raise HttpError(resp, content, uri=self.uri)
  apiclient.errors.HttpError: &lt;HttpError 403 when requesting https://www.googleapis.com/storage/v1/b/pubsite_prod_rev_17179175168453545219/o/financial-stats%2Fsubscriptions%2Fsubscriptions_de.kaasahealth.namagi_cody_monthly_sub_201701_device.csv?alt=json returned "Forbidden"&gt;
  </code></pre>
  
  <p>So obviously there is something wrong with the URL it builds. But i dont know what exactly, as it is the same thing google tells us to do on the doc page.</p>
  
  <p>Hope someone can help me out here :/</p>
  
  <p>EDIT: I changed the traceback, as it changed from error 404 to error 403 now..</p>