Error "Tunneling socket could not be established statusCode 407 " during generation of access token for Orchestrator APIs through Postman

While generating an access token for Orchestrator APIs through Postman, error "Tunneling socket could not be established, statusCode=407" is observed. How can this be resolved?

Issue Description: Error "Tunneling socket could not be established, statusCode=407" when trying to generate access token for Orchestrator APIs through Postman

Solution: By default, the Postman desktop app uses the system's configured proxy to send API requests or access the internet. If needed, authentication details can be entered for the default proxy in the Postman desktop app.
Postman can also be configured to use the system proxy or a custom proxy when sending requests.

Below are the methods to resolve this error based on the type of Proxy enabled at client side:

Configuring the default proxy

If the proxy server configured for the system requires basic authentication, add the credentials to the Postman desktop app. To configure the default proxy, do the following:

  1. In the Postman desktop app, select the settings icon () in the header and select Settings.
  2. Select the Proxy tab.
  3. Under "Default proxy configuration", select the checkbox next to "This proxy requires authentication".
  4. Enter the username and password required by the proxy server.
  5. Select "Save and Restart Postman".


Using the system proxy for requests

If a proxy has been configured for the local system, Postman can use this proxy to send API requests. To configure Postman to use the system proxy, do the following:

  1. Select the settings icon () in the header and select Settings.
  2. Select the Proxy tab.
  3. Under "Proxy configurations for sending requests", turn on the toggle next to "Use system proxy".
  4. (Optional) Turn on the highlighted toggle to use the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables configured for the operating system.

image.png

Note: Ensure that the "Use custom proxy" configuration toggle isn't turned on. If both the system proxy and custom proxy options are enabled, Postman will use the custom proxy.

Using a custom proxy for requests

Configure a custom proxy to send API requests using a proxy server other than the system proxy. HTTP requests, HTTPS requests, or both types of requests can be sent through the custom proxy.

To configure Postman to use a custom proxy, do the following:

  1. Select the settings icon () in the header and select Settings.
  2. Select the Proxy tab.
  3. Under "Proxy configurations for sending requests", turn on the toggle next to "Use custom proxy configuration".
  4. Enter information about the custom proxy:
    • Proxy type - Select the type of requests you want to send through the proxy server. Both HTTP and HTTPS are selected by default.
      • Proxy server - Enter the hostname or IP address of the proxy server and the port number. (Don't include the protocol before the hostname or IP address.)
      • Proxy auth - Turn on this toggle if the proxy server requires basic authentication. Enter the Username and Password for the proxy server.
      • Proxy bypass - Enter a comma-separated list of hosts. Requests sent to these hosts won't use the custom proxy.