Authentication User Account
Contents
Description
User accounts represent a developer, administrator, or any other person who interacts with Google APIs and services. User accounts are managed as Google Accounts, either with Google Workspace or Cloud Identity. They can also be user accounts that are managed by a third-party identity provider and federated with Workforce Identity Federation. [API reference]
Instructions
Follow these steps on how to create Client Credentials (User Account principle) to authenticate and access Google Sheets API in SSIS package or ODBC data source:
automation@my-company.com
).
When you use a personal account which is tied to a specific employee profile and that employee leaves the company,
the token may become invalid and any automated processes using that token will start to fail.
Step-1: Create project
This step is optional, if you already have a project in Google Cloud and can use it. However, if you don't, proceed with these simple steps to create one:
-
First of all, go to Google API Console.
-
Then click Select a project button and then click NEW PROJECT button:
-
Name your project and click CREATE button:
-
Wait until the project is created:
- Done! Let's proceed to the next step.
Step-2: Enable Google Cloud APIs
In this step we will enable Google Sheets API and Google Drive API:
-
Select your project on the top bar:
-
Then click the "hamburger" icon on the top left and access APIs & Services:
-
Now let's enable several APIs by clicking ENABLE APIS AND SERVICES button:
-
In the search bar search for
sheets
and then locate and select Google Sheets API: -
Then enable Google Sheets API:
-
Again, repeat the step and enable Google Drive API as well:
- Done! Let's proceed to the next step.
Step-3: Create OAuth application
-
First of all, click the "hamburger" icon on the top left and then hit VIEW ALL PRODUCTS:
-
Then access Google Auth Platform to start creating an OAuth application:
-
Start by pressing GET STARTED button:
-
Next, continue by filling in App name and User support email fields:
-
Choose Internal option, if it's enabled, otherwise select External:
-
Optional step if you used
Internal
option in the previous step. Nevertheless, if you had to useExternal
option, then click ADD USERS to add a user: -
Then add your contact Email address:
-
Finally, check the checkbox and click CREATE button:
- Done! Let's create Client Credentials in the next step.
Step-4: Create Client Credentials
-
In Google Auth Platform, select Clients menu item and click CREATE CLIENT button:
-
Choose
Desktop app
as Application type and name your credentials: -
Continue by opening the created credentials:
-
Finally, copy Client ID and Client secret for the later step:
- Done! We have all the data needed for authentication, let's proceed to the last step!
Step-5: Configure connection
-
Now go to SSIS package or ODBC data source and use previously copied values in User Account authentication configuration:
- In the ClientId field paste the Client ID value.
- In the ClientSecret field paste the Client secret value.
-
Press Generate Token button to generate Access and Refresh Tokens.
-
Open your Google Sheets spreadsheet in the browser, e.g.:
https://docs.google.com/spreadsheets/d/1QM6WmGloHeGCliCqV3nEj8P-R1RbS59t5xJutN99rU/edit
. -
Extract the spreadsheet Id from the URL and copy it to the clipboard, e.g.
1QM6WmGloHeGCliCqV3nEj8P-R1RbS59t5xJutN99rU
. -
Go back to authentication configuration window and paste it into Default SpreadsheetId field.
-
Finally, click Test Connection to confirm the connection is working.
-
Done! Now you are ready to use Google Sheets Connector!
Parameters
Parameter | Label | Required | Default value | Options | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UseCustomApp | UseCustomApp | YES |
True
|
|
|||||||||||
Scope | Scope | YES |
https://www.googleapis.com/auth/drive~https://www.googleapis.com/auth/spreadsheets
|
|
|
||||||||||
SpreadSheetId | Default SpreadSheetId | YES |
|
|
|||||||||||
ClientId | ClientId |
YES, if UseCustomApp , otherwise NO
|
|
||||||||||||
ClientSecret | ClientSecret |
YES, if UseCustomApp , otherwise NO
|
|
||||||||||||
TabName | Default Tab Name (i.e. Sheet1) |
|
|||||||||||||
RetryMode | RetryMode |
RetryWhenStatusCodeMatch
|
|
||||||||||||
RetryStatusCodeList | RetryStatusCodeList |
403|429
|
|
||||||||||||
RetryCountMax | RetryCountMax |
5
|
|
||||||||||||
ReturnUrl | Redirect URL (Only for Web App) |
|
|