Skip to main content
Question

BoxDeveloperEditionAPIConnection setProxy does not work

  • May 22, 2025
  • 1 reply
  • 30 views

Forum|alt.badge.img

BoxDeveloperEditionAPIConnection apiConnection = new BoxDeveloperEditionAPIConnection(ENTERPRISE_ID, DeveloperEditionEntityType.ENTERPRISE, boxConfig,
accessTokenCache);

InetSocketAddress address = new InetSocketAddress(proxyServerHostname, proxyServerPort);
Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
apiConnection.setProxy(proxy);
apiConnection.authenticate();

 

At my local machine, if I do not setProxy, it works. But in the server, I need to use proxy due to the setup. However if I use the setProxy. It gives me the following error at my local machine and server. What I missed?

 

Couldn't connect to the Box API due to a network error.

 

I am using  box-java-sdk
2.46.0

1 reply

Forum|alt.badge.img

hey  

Is it possible your proxy requires authentication? There is some documentation of other Java SDK users running into this if you want to look through their solutions and see if they help you: https://github.com/box/box-java-sdk/issues/221

What is the exact error message you're receiving?