diff --git a/ads.properties.sample b/ads.properties.sample index 62bb6e90ec..082ed33b8c 100644 --- a/ads.properties.sample +++ b/ads.properties.sample @@ -14,7 +14,7 @@ # - All settings in this file can be set & overridden programmatically. # e.g. GoogleAdsClient.newBuilder() # .fromPropertiesFile() // optionally load from config file. -# .setDeveloperToken("your_token") +# .setLoginCustomerId(1234567890L) # ------------------------------- OAuth 2.0 --------------------------------------- # @@ -65,18 +65,6 @@ # -------------------------- Google Ads API ----------------------------------- -# Developer token -# -# Specifies the credential used to access the Google Ads API. -# -# - Grants access to the API, not any Google account or Google Ads account. -# - Associated with a Google Ads manager accoount. -# - Found by logging into the manager account on http://ads.google.com -# and navigating to -> Tools & Settings -> API Center. -# - An unapproved developer token can be used to issue requests against test -# accounts. -#api.googleads.developerToken= - # Login customer ID # # Specifies an ad account which grants access to ad accounts. diff --git a/google-ads-examples/src/main/java/com/google/ads/googleads/examples/authentication/GenerateUserCredentials.java b/google-ads-examples/src/main/java/com/google/ads/googleads/examples/authentication/GenerateUserCredentials.java index bb6c51634f..97f2b0cef4 100644 --- a/google-ads-examples/src/main/java/com/google/ads/googleads/examples/authentication/GenerateUserCredentials.java +++ b/google-ads-examples/src/main/java/com/google/ads/googleads/examples/authentication/GenerateUserCredentials.java @@ -189,16 +189,13 @@ public void runExample( adsProperties.put(ConfigPropertyKey.CLIENT_SECRET.getPropertyKey(), clientSecret); adsProperties.put( ConfigPropertyKey.REFRESH_TOKEN.getPropertyKey(), userCredentials.getRefreshToken()); - adsProperties.put( - ConfigPropertyKey.DEVELOPER_TOKEN.getPropertyKey(), "INSERT_DEVELOPER_TOKEN_HERE"); showConfigurationFile(adsProperties); } private void showConfigurationFile(Properties adsProperties) throws IOException { System.out.printf( - "Copy the text below into a file named %s in your home directory, and replace " - + "INSERT_XXX_HERE with your configuration:%n", + "Copy the text below into a file named %s in your home directory:%n", GoogleAdsClient.Builder.DEFAULT_PROPERTIES_CONFIG_FILE_NAME); System.out.println( "######################## Configuration file start ########################"); diff --git a/google-ads-examples/src/main/java/com/google/ads/googleads/examples/library/ConfigureClientLibraryProgrammatically.java b/google-ads-examples/src/main/java/com/google/ads/googleads/examples/library/ConfigureClientLibraryProgrammatically.java index dcaf510c8c..14a09df59f 100644 --- a/google-ads-examples/src/main/java/com/google/ads/googleads/examples/library/ConfigureClientLibraryProgrammatically.java +++ b/google-ads-examples/src/main/java/com/google/ads/googleads/examples/library/ConfigureClientLibraryProgrammatically.java @@ -26,7 +26,6 @@ */ public class ConfigureClientLibraryProgrammatically { - private static final String DEVELOPER_TOKEN = "INSERT_DEVELOPER_TOKEN"; private static final String OAUTH_CLIENT_ID = "INSERT_CLIENT_ID"; private static final String OAUTH_CLIENT_SECRET = "INSERT_CLIENT_SECRET"; private static final String REFRESH_TOKEN = "INSERT_REFRESH_TOKEN"; @@ -45,8 +44,6 @@ public static void main(String[] args) { // Creates a GoogleAdsClient with the provided credentials. GoogleAdsClient client = GoogleAdsClient.newBuilder() - // Sets the developer token which enables API access. - .setDeveloperToken(DEVELOPER_TOKEN) // Sets the OAuth credentials which provide Google Ads account access. .setCredentials(credentials) // Optional: sets the login customer ID. This is required when the Google account diff --git a/google-ads-examples/src/main/java/com/google/ads/googleads/examples/reporting/ParallelReportDownload.java b/google-ads-examples/src/main/java/com/google/ads/googleads/examples/reporting/ParallelReportDownload.java index c6b7000cb0..edcdc4770d 100644 --- a/google-ads-examples/src/main/java/com/google/ads/googleads/examples/reporting/ParallelReportDownload.java +++ b/google-ads-examples/src/main/java/com/google/ads/googleads/examples/reporting/ParallelReportDownload.java @@ -128,7 +128,8 @@ private void runExample(GoogleAdsClient googleAdsClient, List customerIds) try (GoogleAdsServiceClient serviceClient = googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) { // IMPORTANT: You should avoid hitting the same customer ID in parallel. There are rate limits - // at the customer ID level which are much stricter than limits at the developer token level. + // at the customer ID level which are much stricter than limits at the Google Cloud project + // level. // Hitting these limits frequently enough will significantly reduce throughput as the client // library will automatically retry with exponential back-off before failing the request. for (String gaqlQuery : GAQL_QUERY_STRINGS) {