Skip to content

Public URL Tunneling

Expose your local mock server to the internet with a public URL. This is useful for testing webhooks from external services, sharing your mocks with teammates, or testing mobile apps against your local server.

API Dev Studio supports two tunnel providers:

ProviderSetupAuthentication
CloudflaredAuto-download availableNo account required
NgrokManual installAccount required
  1. Select your project and make sure the server is running
  2. Click the Tunnel button in the project header
  3. Choose your provider (Cloudflared or Ngrok)
  4. Click Start Tunnel
  5. Copy the public URL from the dialog

Your mock server is now accessible at a public URL like https://random-name.trycloudflare.com.

Cloudflared is the default tunnel provider. It requires no account or authentication.

If Cloudflared is not installed on your system, API Dev Studio will offer to download it automatically:

  1. Click the Tunnel button
  2. If Cloudflared is not detected, click Download Cloudflared
  3. The binary is downloaded to your app data directory
  4. Start the tunnel as normal

You can also install Cloudflared manually:

Windows:

Terminal window
winget install Cloudflare.cloudflared

macOS:

Terminal window
brew install cloudflared

Linux:

Terminal window
sudo apt install cloudflared
# or download from https://github.com/cloudflare/cloudflared/releases

Ngrok requires an account and auth token.

  1. Create an account at ngrok.com
  2. Install Ngrok and authenticate:
    Terminal window
    ngrok config add-authtoken YOUR_TOKEN
  3. Select Ngrok as your tunnel provider in API Dev Studio
  1. Click the Tunnel button (which now shows the active tunnel status)
  2. Click Stop Tunnel

Tunnels are automatically stopped when you stop the project server or close the app.

Many external services (Stripe, GitHub, Slack) need to send webhooks to a publicly accessible URL. Use a tunnel to receive webhooks on your local machine:

  1. Create a webhook endpoint in your project
  2. Start a tunnel
  3. Copy the public URL
  4. Configure the external service to send webhooks to https://your-tunnel-url.com/webhooks/stripe

Share your mock API with a teammate for testing:

  1. Start a tunnel
  2. Send the public URL to your teammate
  3. They can make requests against your mocks from their machine

Test your mobile app against local mocks:

  1. Start a tunnel
  2. Configure your mobile app to use the public URL
  3. Test without needing your phone on the same network

Check:

  1. Your server is running (tunnel requires an active server)
  2. You have internet connectivity
  3. The tunnel binary is installed and accessible

If API Dev Studio cannot find Cloudflared:

  1. Try the auto-download option
  2. Or install it manually and ensure it is in your system PATH
  3. Restart API Dev Studio after installation

Make sure your Ngrok auth token is configured:

Terminal window
ngrok config add-authtoken YOUR_TOKEN
  1. Check that the tunnel status shows “Connected”
  2. Try the URL in an incognito browser window
  3. Some corporate networks may block tunnel traffic