Proxy

Nếu cần kết nối với API Google Ads thông qua một proxy, bạn có thể đặt thuộc tính proxy trong mục CONNECTION của tệp 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"

Ví dụ: bạn có thể chỉ định http://user:pass@localhost:8082 làm proxy. Ngoài ra, bạn có thể định cấu hình chế độ cài đặt proxy theo phương thức lập trình giống như mọi chế độ cài đặt cấu hình khác:

$googleAdsClient = (new GoogleAdsClientBuilder())
    ...
    ->withProxy('protocol://user:pass@host:port')
    ->build();