How it works
- Install ngrok
- Start your API server locally
- Run
ngrok http <port>to create a public endpoint - Share the ngrok URL with anyone who needs to test your API
Quick example
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
- Quickstart: get started with ngrok in minutes
- Authentication: protect your shared API with authentication
- Network security: restrict access by IP or other criteria