OpenAPI Google Cloud | OAuth2

In order to use the OpenAPI Google Cloud components and Authenticate using OAuth2, first you must obtain the OAuth2 Key from Google Cloud.

Find below the steps to get Google OAuth2 Keys and how configure in our PubSub sample application.

 

First login to your Google Cloud Account and use an existing project or create a new one.

After that, go to Credentials menu and press the button CREATE CREDENTIALS, select the option OAuth Client ID.

 

 

Select your application type and set a description name

 

 

If successful, you will get your Client Id and Client Secret.

 

 

Don't share your OAuth2 data with anyone!

 

Now copy to the OpenAPI Google Cloud sample

 

 

 

 

Read more about OAuth2 Configuration.

 

Once you are authenticated, you can re-authenticate calling first the method ClearOAuth2Token (clear all internal OAuth2 Tokens) and then call any OpenAPI requests, a new web-browser will be shown to re-authenticate against google servers.