DEV Community

Software AG Tech Community

Google Cloud Storage OAuth 2.0 Authentication in

Originally published at on ・4 min read


This article describes the step-by-step process of generating an Access token for the Google Cloud Storage OAuth 2.0 Authentication for the


User needs to have a working Google account, to log into the google cloud console. Sometimes it’s required paid tenant depending on the charges applicable on the API.


  • How to generate an Access token for the Google Cloud Storage API for the OAuth 2.0 Authentication.


Any coding or configuration examples provided in this document are only examples and are not intended for use in a production system without verification. The example is only done here to better explain and visualize the possibilities.


  1. Log in to the Google cloud console( ), with the Google credentials. It will look like below. image
  2. Users can create a new project or existing projects can be used. In this case, the existing project has been used. image
  3. Now enable the Google Cloud Storage API for the newly created project or in an existing project. So, click on 3 bars → APIs & Services → Dashboard. image
  4. The dashboard will appear for APIs & Services. Now click on the “ENABLE APIS AND SERVICES”. image
  5. It will take the user to the “API Library”. A search bar will appear, users need to search for the particular API’s, that he needs to activate for this project. image
  6. Let’s enable Google Cloud Storage and we will generate the access token for the same. Search for the Google Cloud Storage API. select and enable It. image
  7. Once the APIs are enabled successfully, It looks like the below screenshot. GCS2
  8. Now the Google Cloud Storage API is enabled successfully for the selected project. Now we will proceed for obtaining the Access token for the Google Cloud Storage OAuth 2.0 Authentication.
  9. To generate the OAuth 2.0 Access_token for any google cloud storage APIs, the user needs to generate the “client_id” & “client_secrets” first. Navigate to the “API & Services” and click on the “Credentials”. On the page choose the “Create Credentials” dropdown and select the “OAuth client ID”. image
  10. The next page is asking for the details of “Create OAuth client ID”, choose the “WebApplication” under the Application type and provide the Name of the Application (any name). provide the redirect URI: OAuth 2.0 Playground and click on the “create” button. image
  11. The next page contains information about the “client_id” & “client_secret”. Note down these details as we need these credentials for the generation of the Access_token. image
  12. Now, we have generated all the necessary credentials for the OAuth 2.0 Authentication from google cloud console. Now we will navigate to Google’s “OAuth 2.0 Playground”. Link: OAuth 2.0 Playground image
  13. Now, search for the Google Cloud Storage API and click on their respective scopes and click on the “Authorize” button. GCS3
  14. Next page will ask for granting the permission for the scopes, click on the “Allow” button. image
  15. It will redirect you again in the “OAuth 2.0 playground” page. Now click on the “Exchange authorization code for tokens” and it will give you the “access_token” as well as the “refresh_token”. The validity of these tokens is around “3600 seconds” i.e- Approximately 1 hour. image
  16. Now, the user can use these “access_token” & “refresh_token” in integration cloud tenant to make a connection for the Google Cloud Storage connector. Now log into the tenant and create a workflow. Inside the workflow drag the Google Cloud Storage app from the menu and click on the “setting” button. GCS4
  17. Choose the action from the predefined operation drop-down menu and click on the “+” sign to configure the new connection. GCS5
  18. Fill in all the necessary credentials details and click on the Save button. GCS6 GCS8
  19. Now, save this connection and let do the dry run while running one operation “listBuckets”. So the integration runs successfully, below is the graphical view for the same. GCS9

Read full topic

Discussion (0)