Google Ads Connector
Documentation
Version: 1
Documentation

Authentication User Account


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 Ads API in SSIS package or ODBC data source:

WARNING: If you are planning to automate processes, we recommend that you use a Service Account authentication method. In case, you still need to use User Account, then make sure you use a system/generic account (e.g. 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.

Manager Account Setup - Obtain Developer Token

To access Google Ads API (your data or someone else data) you must perform the following steps (high level). Detailed steps listed in the next sections.

  1. Create a Google Ads Manager account (formally known as MCC).
  2. Apply for Production data access (Upgrade Developer Token access Level to Basic).
  3. Link manager account with Google Ads Account.
  4. Create a new Project and obtain Client Id and Client Secret

Step-1: Create a Google Ads Manager account (formally known as MCC)

Very first step to access Google Ads API for your own account or someone else account, you will need something called Google Manager Account (formally known as MCC). It will look like a Normal Google Ads Account with some difference so dont get confused if you see similar interface as Ads account.
Click here to see detailed instructions on how to create a manager account. Once you created a manager account, you can login or switch between Ads account and Manager account like below. You can identify manager account using "Manager" word next to the account id when you click Profile dropdown. Login as Google Ads Account Manager (formally known as MCC)

Step-2: Obtain Developer Token

Once you have created and logged in to your Google Ads Manager Account (formally known as MCC) we are ready for the next step which is obtain Developer Token. To access Google Ads API you need to pass developer token in each API call. By default Developer Token is only allowed to access Sandbox (Test) account. If you like to access Production data (Live Ads Account) then you must apply for Basic Access by clicking link under Access Level (See next section for information).
Here is how to can obtain your Developer Token.

  • Log in as Manager account (Or change Top-Right Profile > Choose Manager account ID
  • Click on Admin icon
  • Click on API Center (This option will be missing if you are logged in to Regular Ads account as Client and not using Manager Account (MMC)
  • Expand Access Level, Click Apply for Basic Access if it says "Test". By default Developer Token is created with Test Account access only. To access Production Ads account you must apply for higher access level. Must be Basic or Standard (not Test). After click the link you will see form with few questions, please fill out that and submit the form. Apploval process may take 3-5 days (or longer in some cases if you did not provide enough information).
  • If your token is already approved for the basic access then copy the token and paste on the Google Ads Connector - Connection UI (For Developer Token property)
Click here to see detailed instructions on obtaining a developer token
Developer Token for Google Ads API Access in API Center (Visible when logged in as Manager Account)

Link Manager Account to Google Ads Account

After you have manager account ready, next step is to link manager account with Google Ads Account. You have to send invitation from Manager account to access Google Ads account (it can be your own account or someone else). Here is how to send invite to link Google Ads account.
  • Log in as Manager account (Or change Top-Right Profile > Choose Manager account ID
  • Click on Accounts icon > Sub-account settings > Send Link Request
  • Click on Add Sign (+) and select + Link existing account option
  • When prompted enter Account Id(s) you like to link with this Manager Account. Link Google Manager Account with Ads Account
  • Click Send Request. You can find Ad Account Id usually at the Top-Right corner after you login to the Google Ads account. Send Invitation to link Google Manager Account with Ads Account
  • Now ask Google Ads Account owner to check email. Click Accept Invitation link in the email (If prompted login as Google Ads Account owner).
    -OR-
    Another way to see Invitation, Login to Google Ads account (Or Switch from the Top-Right corner by clicking Profile icon). Go to Admin icon > Access and security > Managers Tab. Find the pending invitation and click ACCEPT. Accept Manager account to Google Ads Account link invitation
  • That's it. Now your Manager account is linked to the Google Ads account

Obtain ClientId and ClientSecret

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:

  1. First of all, go to Google API Console.

  2. Then click Select a project button and then click NEW PROJECT button:

    Start creating a new project in Google Cloud
  3. Name your project and click CREATE button:

    Create a new project in Google Cloud
  4. Wait until the project is created:

    Wait until project is created in Google Cloud
  5. Done! Let's proceed to the next step.

Step-2: Enable Google Ads API

In this step we will enable Google Ads API:

  1. Select your project on the top bar:

    Select project in Google Cloud
  2. Then click the "hamburger" icon on the top left and access APIs & Services:

    Access APIs and services in Google Cloud
  3. Now let's enable several APIs by clicking ENABLE APIS AND SERVICES button:

    Enable API for project in Google Cloud
  4. In the search bar search for Ads and then locate and select Google Ads API:

    Search for API in Google Cloud
  5. Enable Google Ads API:

    Enable Google Ads API
  6. Done! Let's proceed to the next step.

Step-3: Create OAuth application

  1. First of all, click the "hamburger" icon on the top left and then hit VIEW ALL PRODUCTS:

    View all products in Google Cloud
  2. Then access Google Auth Platform to start creating an OAuth application:

    Open Google Auth Platform in Google Cloud
  3. Start by pressing GET STARTED button:

    Start creating an app in Google Cloud
  4. Next, continue by filling in App name and User support email fields:

    Fill app info in Google Cloud
  5. Choose Internal option, if it's enabled, otherwise select External:

    Choose app audience in Google Cloud
  6. Optional step if you used Internal option in the previous step. Nevertheless, if you had to use External option, then click ADD USERS to add a user:

    Add test user in Google Cloud app
  7. Then add your contact Email address:

    Enter app contact info in Google Cloud
  8. Finally, check the checkbox and click CREATE button:

    Create app in Google Cloud
  9. Done! Let's create Client Credentials in the next step.

Step-4: Create Client Credentials

  1. In Google Auth Platform, select Clients menu item and click CREATE CLIENT button:

    Start creating app client in Google Cloud
  2. Choose Desktop app as Application type and name your credentials:

    Create OAuth app client in Google Cloud
  3. Continue by opening the created credentials:

    View app client credentials in Google Cloud
  4. Finally, copy Client ID and Client secret for the later step:

    Use client ID and secret to read Google REST API data
  5. Done! We have all the data needed for authentication, let's proceed to the last step!

Step-5: Configure connection

  1. 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.
    • In the DeveloperToken field paste the Developer Token value.
  2. Press Generate Token button to generate Access and Refresh Tokens.

  3. Finally, click Test Connection to confirm the connection is working.

  4. Done! Now you are ready to use Google Ads Connector!

Parameters

Parameter Label Required Default value Options Description
UseCustomApp UseCustomApp YES True Use your own app credentials or inbuilt app provided by ZappySys for ease of use. If you choose UseCustomApp=true then make sure to obtain your own ClientId and Secret using steps provided (Click [Steps to Configure] link found next to Authentication Type dropdown)
CustomerId CustomerId (without dash e.g. 2125557752) YES Login to your Google Ads account and see top-right corner for your CustomerId
DeveloperToken DeveloperToken YES Login to your Ads Manager account. Go to Admin > API Center and you will see Developer Token. Make sure access level is Basic or Standard if you wish to access Live Ads Account. If Access Level is Test then you can apply for live account access by clicking on Access Level and follow the link.
ClientId ClientId YES, if UseCustomApp, otherwise NO
ClientSecret ClientSecret YES, if UseCustomApp, otherwise NO
Scope Scope https://www.googleapis.com/auth/adwords
LoginCustomerId Login CustomerId (without dash e.g. 2125557752) This is generally the identifier associated with the customer who is performing the action or making the API request. It refers to the customer whose credentials are being used to authenticate and authorize the API call.
LinkedCustomerId Linked CustomerId (without dash e.g. 2125557752) This ID refers to the identifier of a different customer (or another entity) that is linked or associated with the login-customer-id. For example, this could represent a customer who is part of a family plan, a business account that has multiple users, or a parent-child relationship between customer accounts.
ApiVersion API Version v19
Name Value
v19 v19
v18 v18
v17 v17
v16 v16
v15 v15
RetryMode RetryMode RetryWhenStatusCodeMatch
Name Value
None None
RetryAny RetryAny
RetryWhenStatusCodeMatch RetryWhenStatusCodeMatch
RetryStatusCodeList RetryStatusCodeList 429
RetryCountMax RetryCountMax 5
RetryMultiplyWaitTime RetryMultiplyWaitTime True
ReturnUrl Redirect URL (Only for Web App)
Name Value
https://zappysys.com/oauth/ https://zappysys.com/oauth/
Only specifiy this if you have created Credential as Web Application rather than Desktop. In Desktop App you dont have to supply Return URL (its always localhost). When you keep this blank it uses default value http://localhost:[some_random_port_each_time] for redirect_url)