หากต้องการเชื่อมต่อกับ Google Ads API ผ่านพร็อกซี คุณสามารถทำได้โดยการตั้งค่าพร็อพเพอร์ตี้ proxy
ในส่วน CONNECTION
ของไฟล์ 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();