title: Anonymous caller does not have storage.objects.get
body: <p>On Google App Engine (GAE) written in Python.</p>
  
  <p>I am trying to issue an http post to cloud-speech-to-text api and using URI audio source (Google Cloud Storage Bucket Objects).</p>
  
  <p>I am using the following headers;</p>
  
  <pre><code>Authorization: BASIC encoded_base64(username:password)
  </code></pre>
  
  <p>But I still keep getting an error response below:</p>
  
  <blockquote>
    <p>{
      "error": {
        "code": 403,
        "message": "Anonymous caller does not have storage.objects.get access to bucket_of_secrets/four_score_seven_years.flac.",
        "status": "PERMISSION_DENIED"
      }
    }</p>
  </blockquote>
  
  <p>So I have a couple of questions;</p>
  
  <ol>
  <li>Does BASIC Authorization Header work in Google HTTP API? </li>
  <li>What <code>username:password</code> should I use? Is it my GCP account email and password? i.e. <code>handsome_dude@gmail.com:deluded_fool</code></li>
  </ol>
  
  <p>Where <code>handsome_dude@gmail.com</code> is the username and <code>deluded_fool</code> is the password.</p>
  
  <p>I've tried setting the bucket objects to be public readable and of course the http call works... but I would rather avoid setting my bucket objects public readable.</p>
  
  <p>Here's a sample Curl request:</p>
  
  <pre><code>curl -X POST 
  
  https://speech.googleapis.com/v1/speech:longrunningrecognize?key=&lt;secret_api_key&gt; -d @sample.json -H "Content-Type: application/json, Authorization:  Basic base64encodedusername:password" 
  </code></pre>
  
  <p>Here's a snippet in my python code using urlfetch:</p>
  
  <pre><code>url_post = urlfetch.fetch(url=speech_to_text_url_post, payload=json.dumps(data_to_post), method=urlfetch.POST, headers={"Content-Type" : "application/json", "Authorization" : "Basic "+encoded_user_password})
  </code></pre>