The library looks for a configuration file in
`System.getProperty("user.home") + "/searchads360.properties"`.

The format of the configuration file is that of a Java
[Properties](https://docs.oracle.com/javase/tutorial/essential/environment/properties.html)
file of key value pairs. The supported keys vary depending on the chosen
authentication flow.

## Supported keys for desktop and web application flows

If you are using the [desktop or web](https://developers.google.com/search-ads/reporting/quickstart/quickstart-guide.md.txt#create_oauth2_credentials) application flow, the supported keys
are as follows:

```bash
# Credential for accessing Google's OAuth servers.
# Provided by console.cloud.google.com.
api.searchads360.clientId=INSERT_CLIENT_ID_HERE

# Credential for accessing Google's OAuth servers.
# Provided by console.cloud.google.com.
api.searchads360.clientSecret=INSERT_CLIENT_SECRET_HERE

# Renewable OAuth credential associated with 1 or more Search Ads accounts.
api.searchads360.refreshToken=INSERT_REFRESH_TOKEN_HERE

# 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.searchads360.loginCustomerId=INSERT_LOGIN_CUSTOMER_ID_HERE


```

> [!NOTE]
> **Note:** You can generate an OAuth refresh token by running the provided [user credential generation script](https://developers.google.com/search-ads/reporting/sample-code/generate-user-credentials.md.txt) or by using the [OAuth Playground](https://developers.google.com/search-ads/reporting/concepts/oauth-playground.md.txt) utility.

## Combining configuration approaches

The `SearchAds360Client` and its builder support combining different configuration
strategies. For example, you can use a properties file to configure the
credentials of the instance and for other attributes using
the following snippet.

```java
SearchAds360Client searchAds360Client = SearchAds360Client.newBuilder()
    .fromPropertiesFile()
    .build();
```

You can make further changes at runtime using the builder's other configuration
methods before calling `build()`.

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

```java
api.searchads360.loginCustomerId --> Manager account ID (with hyphens removed).
```