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.
Supported Providers
Section titled “Supported Providers”API Dev Studio supports two tunnel providers:
| Provider | Setup | Authentication |
|---|---|---|
| Cloudflared | Auto-download available | No account required |
| Ngrok | Manual install | Account required |
Starting a Tunnel
Section titled “Starting a Tunnel”- Select your project and make sure the server is running
- Click the Tunnel button in the project header
- Choose your provider (Cloudflared or Ngrok)
- Click Start Tunnel
- Copy the public URL from the dialog
Your mock server is now accessible at a public URL like https://random-name.trycloudflare.com.
Cloudflared (Recommended)
Section titled “Cloudflared (Recommended)”Cloudflared is the default tunnel provider. It requires no account or authentication.
Auto-Download
Section titled “Auto-Download”If Cloudflared is not installed on your system, API Dev Studio will offer to download it automatically:
- Click the Tunnel button
- If Cloudflared is not detected, click Download Cloudflared
- The binary is downloaded to your app data directory
- Start the tunnel as normal
Manual Install
Section titled “Manual Install”You can also install Cloudflared manually:
Windows:
winget install Cloudflare.cloudflaredmacOS:
brew install cloudflaredLinux:
sudo apt install cloudflared# or download from https://github.com/cloudflare/cloudflared/releasesNgrok requires an account and auth token.
- Create an account at ngrok.com
- Install Ngrok and authenticate:
Terminal window ngrok config add-authtoken YOUR_TOKEN - Select Ngrok as your tunnel provider in API Dev Studio
Stopping a Tunnel
Section titled “Stopping a Tunnel”- Click the Tunnel button (which now shows the active tunnel status)
- Click Stop Tunnel
Tunnels are automatically stopped when you stop the project server or close the app.
Use Cases
Section titled “Use Cases”Testing Webhooks
Section titled “Testing Webhooks”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:
- Create a webhook endpoint in your project
- Start a tunnel
- Copy the public URL
- Configure the external service to send webhooks to
https://your-tunnel-url.com/webhooks/stripe
Sharing with Teammates
Section titled “Sharing with Teammates”Share your mock API with a teammate for testing:
- Start a tunnel
- Send the public URL to your teammate
- They can make requests against your mocks from their machine
Mobile Testing
Section titled “Mobile Testing”Test your mobile app against local mocks:
- Start a tunnel
- Configure your mobile app to use the public URL
- Test without needing your phone on the same network
Troubleshooting
Section titled “Troubleshooting”Tunnel Won’t Start
Section titled “Tunnel Won’t Start”Check:
- Your server is running (tunnel requires an active server)
- You have internet connectivity
- The tunnel binary is installed and accessible
Cloudflared Not Detected
Section titled “Cloudflared Not Detected”If API Dev Studio cannot find Cloudflared:
- Try the auto-download option
- Or install it manually and ensure it is in your system PATH
- Restart API Dev Studio after installation
Ngrok Authentication Error
Section titled “Ngrok Authentication Error”Make sure your Ngrok auth token is configured:
ngrok config add-authtoken YOUR_TOKENPublic URL Not Accessible
Section titled “Public URL Not Accessible”- Check that the tunnel status shows “Connected”
- Try the URL in an incognito browser window
- Some corporate networks may block tunnel traffic