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 informations
Get the authorization codeGo to the Google Cloud console. On the Registered Domains page, click the domain name that you'd like to transfer out. On the Domain details page, click Authorization code. The code is available on the Authorization code pop-up dialog.
To get a new access token, use the refresh token as you would an authorization code, but with a grant_type value of refresh_token and a refresh_token parameter that holds the contents of the refresh token. The type of grant being used. To exchange a refresh token for an access token, use refresh_token .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With