有兴趣分享您对 Google Ads API 的反馈吗?
注册即可获邀参与用户调研!
代理
如果您需要通过代理连接到 Google Ads API,可以通过以下方式实现
在 CONNECTION
部分设置 proxy
属性
google_ads_php.ini
文件:
[CONNECTION]
; Optional proxy settings to be used by requests.
; If you don't have username and password, just specify host and port.
proxy = "protocol://user:pass@host:port"
例如,您可以指定 http://user:pass@localhost:8082
作为代理。
或者,您可以通过编程方式配置代理设置,
任何其他配置设置:
$googleAdsClient = (new GoogleAdsClientBuilder())
...
->withProxy('protocol://user:pass@host:port')
->build();
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-20。
[null,null,["最后更新时间 (UTC):2024-08-20。"],[[["The Google Ads API can be accessed through a proxy by configuring the `proxy` property in the `google_ads_php.ini` file or programmatically using the `withProxy()` method."],["The proxy configuration should follow the format `protocol://user:pass@host:port`, where username and password are optional if not required by the proxy server."]]],[]]