Google Cloud | Google OAuth2 Keys

In order to use the sgcWebSockets 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 sgcWebSockets PubSub sample, and add the Project Id (NOT the project name)

 

 

This is how will must be configured in sgcWebSocket PubSub sample

 

 

Then you can try to create a new topic for example, the first time, you must authorize the OAuth2 connection, so a new web-browser will be shown to request an authorization to access your account with the OAuth2 credentials provided by google

 

 

Allow the connection, and if successful you can start to work with this API