有兴趣分享您对 Google Ads API 的反馈吗?
注册即可获邀参与用户调研!
代理
如果您需要通过代理连接到 Google Ads API,可以在 googleads.properties
文件的 Network Connection
部分设置 proxy
属性:
### Network Connection ###
# Optional proxy server URL to be used for internet connectivity.
# If your proxy connection requires authentication, make sure to include it in
# the URL, for example: http://user:password@proxy_hostname:8080
proxy=INSERT_PROXY_HERE
例如,您可以将 http://user:pass@localhost:8082
指定为代理。或者,您也可以像配置任何其他配置设置一样,以程序化方式配置代理设置:
my $api_client = Google::Ads::GoogleAds::GoogleAdsClient->new({
proxy => "INSERT_PROXY_HERE"
});
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-04。
[null,null,["最后更新时间 (UTC):2025-03-04。"],[[["Configure Google Ads API connections through a proxy by setting the `proxy` property in the `googleads.properties` file or programmatically within the `Google::Ads::GoogleAds::GoogleAdsClient` constructor."],["When using a proxy that requires authentication, include the credentials within the proxy URL in the format `http://user:password@proxy_hostname:8082`."]]],[]]