Prepare the customer account

In this step, you identify a Google Ads account to make API calls to. You need its email address to generate OAuth 2.0 refresh tokens. The account can either be a production (live) account or a test account. Each approach has its advantages and disadvantages.

Production accounts
Test accounts
  • 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.
  • 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 need to 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 might be restricted to a list of allowlisted accounts.

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.

User access, login customer ID, and customer ID

To make an API call to a Google Ads customer, you need access to that customer either directly or through a linked manager account. You also need the proper permissions depending on the particular API call.

When signing in to Google Ads, 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, and your access level.

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 email address of the customer account you're signed in to. This is needed to generate the OAuth 2.0 refresh token.

  • 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.