If your APIs exist behind a firewall on your private network, you'll need to use our Sauce Connect Proxy solution to open up a secure trusted connection between your network and Sauce Labs.
- Have the Sauce Connect Proxy client on your local machine (download here).
If you're new to Sauce Connect Proxy, check out Using Sauce Connect Proxy, Sauce Connect Proxy System and Network Requirements, and Sauce Connect Proxy Quickstart Guide.
- Create a .yaml configuration file using the text below. Substitute your SAUCE_USERNAME and SAUCE_ACCESS_KEY where indicated. Optionally, you can define a name for your tunnel (
rest-url: "https://api.us-west-4-i3er.saucelabs.com/rest/v1"user: "SAUCE_USERNAME"api-key: "SAUCE_ACCESS_KEY"vm-version: "v2alpha"tunnel-identifier: "YOUR-TUNNEL-NAME"
- Save your .yaml file to the same folder as your Sauce Connect Proxy client. In this example, the file is named
- Open your CLI terminal and navigate to your Sauce Connect Proxy folder.
- Start your tunnel by issuing:
bin/sc -c api-config.yaml
- Log in to Sauce Labs.
- Click API TESTING > Get Started to launch Sauce Labs API Testing.
- Click the Projects tab to view all of your projects, then click on your project name.
- Under Run Configuration, click No Tunnel (default) to trigger the Sauce Connect Proxy dropdown menu, then click the name of your tunnel.
Now you're set up to run your API tests through a Sauce Connect Proxy tunnel.