Interested in sharing your feedback about the Google Ads API?
Sign up to be invited to participate in user research!
Proxy configuration
The Java client library supports proxy settings for connecting to the API.
Settings
The library supports using the
standard proxy settings for Java.
For HTTPS proxy set the proxy configuration as:
-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT
For HTTP proxy (not recommended unless you're providing your own HTTP endpoint),
set the proxy configuration as:
-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT
It is possible to configure both HTTP and HTTPS proxy at runtime.
System.setProperty("https.proxyHost", HOST);
System.setProperty("https.proxyPort", PORT);
If you change this setting then you must recreate any service clients provided
by GoogleAdsClient.getVersionX().createYServiceClient()
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-17 UTC.
[null,null,["Last updated 2024-06-17 UTC."],[[["The Java client library enables connections to the API through proxy settings, utilizing standard Java proxy configurations."],["For HTTPS proxy connections, use `-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT`, while HTTP proxy (less secure) uses `-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT`."],["Both HTTP and HTTPS proxy settings can be dynamically configured at runtime using `System.setProperty()`."],["Any changes to the proxy settings require recreating service clients via `GoogleAdsClient.getVersionX().createYServiceClient()` to apply the new configuration."]]],[]]