Google API Console Configurations

Last updated on
22 July 2020

Before we start authentication with google, we need to setup few things on our google account.  

1) Open Google API Console, If you don't have any project it will prompt you to create new project

2) Create a new project and give it appropriate name, for example if you are going to access the google calendar and your brand name is ABC then you can name it "ABC Calendar", now you should see dashboard 

3) On this dashboard you can click on "+ ENABLE APIS AND SERVICES" and enable the desired service say "Google Calendar"

4) From the Dashboard , Click OAuth Conset Screen, depending on your goals the project/app can be internal or external use, In case of external use you are opening the app to be authenticated to end user, if you want to operate only on your own products keep it internal (only for gsuite users), for normal users you have to leave it external.  On the next screen enter your app name like in this example we take "ABC Calendar", provide proper site urls, privay policy, etc and save the app.

5) From the Dashboard, Goto the Credentials Link on the left sidebar

5) Click on "+ CREATE CREDENTIALS" (depending on what you are using the account for you can choose either OAuth Client Id or Service Account, if you are not sure just go for OAuth Client Id)

As we are considering OAuth Client here, the next form will have few field like

  • Application type - The type of application, in our case select "Web Application".
  • Name - Provide some name to the web client, useful if you have multiple clients (can be helpful for advanced users)
  • Authorized redirect URIs - This is important step, you need to add YOUR_SITE_DOMAIN/google_api_client/callback, so if my domain is say sadashiv.com then the url should be 
    https://sadashiv.com/google_api_client/callback

    Click "Create"

If you are create service account then you will need to fillup

  • Service account name - Provide some name to the services account similar to the Name in OAuth Client
  • Grant user access roles and assign user to roles (this is optional and I leave explanation to google documentation)

6) If you created OAuth credentials then now it should show you a popup with credentials of the app

These creads can now be used in the module configuration for authentication.

If you created a Service Accounts then the new account is listed under Service Accounts, click edit next to it and click on "Add key" and you should see a popup with JSON selected by default

Click "CREATE".  A new key is created and the json file is downloaded, you can use contents of this file in the configuration.

Help improve this page

Page status: No known problems

You can: