Skip to main content
When building APIs, you often need to share your work with teammates or partners before deploying. ngrok lets you expose your local API server with a public HTTPS URL so others can interact with it right away.

How it works

  1. Install ngrok
  2. Start your API server locally
  3. Run ngrok http <port> to create a public endpoint
  4. Share the ngrok URL with anyone who needs to test your API

Quick example

ngrok http 8080
Share the HTTPS forwarding URL with your team. They can make requests to your local API as if it were deployed.

Collaboration benefits

  • Instant sharing: Share a working API with teammates without pushing to a staging environment.
  • Real-time iteration: Make changes locally and have them immediately reflected for anyone using the URL.
  • Frontend-backend collaboration: Frontend developers can point their app at your local API while you iterate on it.
  • External testing: Share your API with partners or clients for early integration testing.

Inspect API traffic

Use ngrok’s Traffic Inspector to monitor all API requests and responses in real time. This is especially helpful for debugging integration issues when working with external consumers.

Add authentication

Protect your shared API by adding authentication with a Traffic Policy. You can require OAuth or other forms of authentication without changing your application code. See the authentication guide for setup instructions.

Next steps