title: Invalid Credentials using Google Cloud Platform Buckets
body: <p>We have a bucket in Google Cloud Platform to manage pictures.
  I am trying to upload a picture to it using Curl.</p>
  <p>Respective to the official documentation linked <a href="https://cloud.google.com/storage/docs/uploading-objects#storage-upload-object-csharp" rel="nofollow noreferrer">here</a>, this is the Curl-command I used:</p>
  <pre><code>curl -X POST --data-binary @cat.jpeg \
      -H &quot;Authorization: Bearer A_STRING_SUPPOSED_TO_BE_A_KEY&quot; \
      -H &quot;Content-Type: image/jpeg&quot; \
      &quot;https://storage.googleapis.com/upload/storage/v1/b/upload_zone/o?uploadType=media&amp;name=cat&quot;
  </code></pre>
  <p>This is the answer we get:</p>
  <pre><code>{
    &quot;error&quot;: {
      &quot;code&quot;: 401,
      &quot;message&quot;: &quot;Invalid Credentials&quot;,
      &quot;errors&quot;: [
        {
          &quot;message&quot;: &quot;Invalid Credentials&quot;,
          &quot;domain&quot;: &quot;global&quot;,
          &quot;reason&quot;: &quot;authError&quot;,
          &quot;locationType&quot;: &quot;header&quot;,
          &quot;location&quot;: &quot;Authorization&quot;
        }
      ]
    }
  }
  </code></pre>
  <p>It seems our key is invalid, we are not sure what to use as Authorization key. Where can we find the OAUTH2.0-key required to make use of the Google Cloud Platform Bucket, do we need to generate it somewhere?</p>
  <p><strong>Edit:</strong>
  We have generated a key using the OAuth 2.0-Playground, and it worked! But the key expires every 3000 seconds...</p>