Prepare the customer account

In this step, you identify a Google Ads account to make API calls to. The account can either be a production (live) account or a test account. Each approach has its advantages and disadvantages.

Production accounts
Test accounts
Advantages
  • Easier to write and test code that works against specific account contents.
  • Easier to write and test code that processes live reporting data.
  • Test accounts don't serve ads, hence programming bugs won't affect your live campaigns.
  • Works with developer tokens that have Test Access level.
Disadvantages
  • A programming bug in the development phase could affect live campaign serving, leading to issues such as poor campaign performance, incorrect serving, or financial losses.
  • The developer token should have at least the Basic Access level to in order to make API calls.
  • You must reconstruct campaigns within test accounts to test code that works against specific account contents.
  • Since test accounts don't serve ads, features related to live serving such as reporting stats, policy violation errors, or processing offline conversion imports are not supported, making it difficult to test those features.

We recommend using a test account while developing your application when possible. For instructions, see Create test accounts and campaigns.

An alternative is to set up a production account with a low account budget, such as $1/day, explicitly for testing features that are not supported by a test account.

Choice of feature set

When choosing an account for making API call, an additional consideration is the list of features you'd want to use with the API. Even if you choose to use a production account, there are some features that are account-specific, for example:

  • For billing features, you need an account that is on monthly invoicing.
  • Some new features in the account might be restricted by allowlists.

Before finalizing the account to make API calls against, check the documentation of the specific feature to make sure that the feature doesn't have additional restrictions.

Identify the login customer ID and customer ID

To make an API call to a Google Ads customer, you must grant access and appropriate permissions to your service account to the customer account either directly or through a linked manager account. To do this, you need administrator access to the customer account.

Start by signing in to your Google Ads account as an administrator. In some cases, you might have more than one customer account to choose from. The account you select establishes the login customer ID, which is a required header for some API calls.

After you've identified the Google Ads customer to make API calls to, note the following details:

  • The 10-digit customer ID of the customer account to which you plan to make API calls against. This is sometimes referred to as the operating customer.

  • The 10-digit login customer ID of the customer account you're signed in to. If you're signed in to the operating customer, the login customer ID is the same as the customer ID. If you signed into a manager account of the operating customer, the login customer ID is the customer ID of the manager account.

Grant access to the service account

  1. While signed in to your Google Ads account as an administrator, navigate to Admin > Access and security.

  2. Click the + button under the Users tab.

  3. Type the service account email address into the Email input box. Select the appropriate level of account access level and click the Add account button. Note that Email access level is not supported for service accounts.

  4. The service account is granted access.

By default, you cannot grant administrator access to a service account. If your API calls require administrator access, you can upgrade the access as follows.

  1. Click the drop-down arrow next to the access level of the service account in the Access level column.

  2. Select Admin from the drop-down list.