I found this error log when I tried to connect Google Ads API.
Request
-------MethodName: google.ads.googleads.v2.services.GoogleAdsService/SearchEndpoint: googleads.googleapis.com:443Headers: {developer-token=REDACTED, login-customer-id=5788147835, x-goog-api-client=gl-java/1.8.0_191 gapic/1.0 gax/1.0 grpc/1.0}Body: [FAILED toString()]
Response--------Headers: nullBody: nullFailure message: nullStatus: Status{code=UNAVAILABLE, description=io exception, cause=io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: null: googleads.googleapis.com/216.58.199.106:443 What I think it's because of proxy.
However I cannot find the solution how can I set the proxy in Java library. I found the solution for only PHP.
https://developers.google.com/google-ads/api/docs/client-libs/php/proxy
Could you figure out how to do it because I cannot find something like “.setProxy” method?
This is how we create the Google Ads client.
GoogleAdsClient
.newBuilder()
.fromProperties(oauthProperties)
.build()