2022
Page History
...
Domain - Organization URL to be added here
Email - admin user email address
Key Value - this is to be gathered using the steps listed below:
Setting up GCloud Console Project
The very first step should be to create and setup a GCloud Console Project. Following are the steps to do so:
Login using the super admin credentials.
Once logged in, click the top nav bar project selector, you will see an option to create a “New Project” in the panel that shows up once you click the project selector.
Enter the project name, organization and location and create the project.
Then the next step is to create a service account, use the following steps to do so:
Make sure that you have selected the newly created project from the project selector on the top nav bar.
Once selected, from the left menu, under “APIs & Services” select “Credentials”.
Click “Manage Service Account” and under the Service Accounts Page, click the “Create Service Account” button on the top.
Give a proper name to the service account (Our code should not affect the name that is used).
It will pre-fill email, update in case you want to change as this would not affect our code.
Enter proper description, again this should not affect the code.
Click “Create”
Once created, it will ask to select a Role, select Project > Owner as the role and click Continue.
Next step is to grant service account access, there are 2 text boxes, in both the text boxes, enter the super admin account email id and click “Done”.
Once created, it will take you to the Service Account Manage page where the newly created Service Account will be listed.
Click on the Service Account and it will take you to the Service Account Details page. Click Edit to start editing the account.
Click on the “Show Domain Wide Delegation” link and Enable Domain wide delegation by checking the checkbox. Note to wait for a few mins in case the checkbox is disabled, as we noticed that it takes a few mins to have the checkbox enabled.
Enter proper Product Name here.
Click Save.
Once saved, under the Keys section, Create a new key, use JSON format. Make sure you download the key as it would not let you download the key later. Download the file as g_suite_credentials.json
One the Service Account Details page, make sure you copy the Unique Id shown on that page as we will need it later (It will look something like: 117173051217199643714)
Now it’s time to setup the libraries, use the following steps to set it up:
Make sure that you have selected the newly created project from the project selector on the top nav bar.
Once selected, from the left menu, under “APIs & Services” select “Library”.
Enable the following APIs for our project:
Admin SDK
Gmail API
Google Drive API
Google Calendar API
People API
Once enabled you will see the enabled list under APIs & Services > Dashboard.
Once APIs are enabled for the project, we have to now setup Scopes, use the following steps to do the same:
Go to: https://admin.google.com/
Login using the Super Admin Credentials.
Under “Security” go to “API Controls” and click “Manage Domain Wide Delegation”
Click on “Add New” and enter the unique ID copied in above step inside the Client ID textbox.
Add the following list of scopes:
Once done, click “Authorize”.
Now, it’s time to create a OAuth Client, use the following steps to do so:
Make sure that you have selected the newly created project from the project selector on the top nav bar.
Once selected, from the left menu, under “APIs & Services” select “Credentials”.
Click “Create Credentials” from the top nav bar and select OAuth Client ID.
Select a “Desktop Application” for now since we do not have this application hosted anywhere.
Give an appropriate name and click “Create”.
Download the client secret on your environment and name it client_credentials.json
For generating Key Value follow steps mentioned here