How to call google vision api via a proxy

1,031 views
Skip to first unread message

au...@hq.bill.com

unread,
Nov 30, 2017, 2:30:33 PM11/30/17
to cloud-vision-discuss
Hi,
We have a proxy set up in our company in order to make calls to outside services. We are using Python 3 to make calls to Google Vision API and the interface that we use is ImageAnnotatorClient. For making calls to Google Vision API we need to be able to pass in the proxy server to the HTTP client underlying the ImageAnnotatorClient. There is no documentation available to pass proxy server as a parameter to this client. Please provide steps/guidance about how to make calls to Google Vision API through a proxy server.
Thanks.

au...@hq.bill.com

unread,
Dec 4, 2017, 10:18:36 PM12/4/17
to cloud-vision-discuss
For anyone who is interested in this, the solution at this link worked for me - https://stackoverflow.com/a/31641300

Thanks.

Karim Shaik

unread,
Apr 4, 2020, 12:48:19 AM4/4/20
to cloud-vision-discuss
Hello,

I have used below settings in my java code for setting up the Proxy host and port to access this Vision API using ImageAnnotatorClient.

                System.setProperty("https.proxyHost", "HOST IP ADDRESS");
System.setProperty("https.proxyPort", "HOST PORT NUMBER");

Google API allows only HTTPS proxy settings. I tried with setting up http.proxyHost hasn't worked out. Try these settings. It worked for me.

Thanks
Reply all
Reply to author
Forward
0 new messages