rohitcoder
rohitcoder

Reputation: 400

How to get Authorization token for Google Cloud Storage

I am trying to integrate Google cloud storage API for transferring all my web app uploads to google cloud storage.

According to documentation, I need to pass Authorization header every time making a new request but am not getting where I can get that Authorization token? I tried so hard I checked a lot of Git repos and StackOverflow discussions.

Still am not able to find answers.

For more information:

A screenshot of the aforementioned documentation for listing objects on Google Cloud.

Upvotes: 11

Views: 12025

Answers (1)

Rubén C.
Rubén C.

Reputation: 1098

You can get the Authorization token in OAuth 2.0 Playground. Follow the steps described. Notice that in step 2 you have to click on “Exchange authorization code for tokens” to obtain the “Access token” you need. I suggest you to follow this Uploading objects guide (REST APIs) the first time you try it.

Perhaps you can do this using the Cloud Storage Client Libraries.

Upvotes: 4

Related Questions