The Java client library configuration file

By default we look for a configuration file in System.getProperty("user.home") + "/" . You can override this path by calling GoogleAdsClient.newBuilder().fromPropertiesFile(PATH_TO_CONFIG_FILE).

The format of the configuration file is that of a Java Properties file (i.e. key value pairs). The supported keys are as follows:

# Credential for accessing Google's OAuth servers.
# Provided by

# Credential for accessing Google's OAuth servers.
# Provided by

# Renewable OAuth credential associated with 1 or more Google Ads accounts.

# Token which provides access to the Google Ads API in general. It does not
# grant access to any particular ad account (OAuth is used for this purpose).

# Required for manager accounts only: Specify the login customer ID used to
# authenticate API calls. This will be the customer ID of the authenticated
# manager account. You can also specify this later in code if your application
# uses multiple manager account + OAuth pairs.
# api.googleads.loginCustomerId=INSERT_LOGIN_CUSTOMER_ID_HERE

Reusing configuration files from AdWords API java client library

You can use the same file you used for the AdWords API. Simply copy the lines for the following keys and change the api.adwords prefix in each key from api.adwords to api.googleads:

api.adwords.clientId       --> api.googleads.clientId
api.adwords.clientSecret   --> api.googleads.clientSecret
api.adwords.refreshToken   --> api.googleads.refreshToken
api.adwords.developerToken --> api.googleads.developerToken

If you are authenticating as a manager account, additionally you must specify:

api.googleads.loginCustomerId --> Manager account ID (with hyphens removed).