Skip to main content

Proxy Configuration Support

APIMatic’s SDKs provide native proxy support to meet enterprise requirements for network traffic routing, security monitoring, and compliance. This implementation allows seamless integration with corporate proxy infrastructures without modifying generated code.

Why Proxy Support Matters

Enterprise environments typically mandate proxy usage for:

  • Security: Monitoring and filtering outgoing traffic
  • Compliance: Meeting regulatory requirements for data governance
  • Authentication: Corporate network access control
  • Auditing: Centralized logging of API traffic

Without our built-in proxy support, you’d need to manually modify SDK code (breaking maintainability), implement complex network layer overrides, or configure system-wide proxy settings that lack granularity.

Implementation Approach

The proxy configuration leverages each language's native HTTP client capabilities for:

  • Consistency across all SDKs
  • Maintainability with no custom proxy handling code
  • Performance through optimal routing via native implementations
  • Security with proper credential handling and TLS support

Proxy Settings

ParameterRequiredDescription
addressYesFull URL of the proxy server (example, http://proxy.corp.example.com)
portNoPort number used to connect to the proxy server
authNoCredentials for proxy authentication (if required)
tunnelNoEnables HTTPS tunneling through proxy when true (default: false)

SDK Client Initialization

$client = SdkClientBuilder::init()
->environment(Environment::PRODUCTION)
->timeout(10)
->proxyConfiguration(
ProxyConfigurationBuilder::init('http://proxy.example.com') // Address (Required)
->port(8080) // Custom proxy port
->auth("username","password") // Provides credentials
->authMethod(CURLAUTH_BASIC) // Specifies the authentication method to use
->tunnel(false) // Enables Http tunneling
)
->build();

Supported auth methods can be found here:(libcurl authentication documentation):