When I start an ngrok client with ./ngrok tcp 22 it runs in the foreground and I can see the randoming generated forwarding URL, such as tcp://0.tcp.ngrok.io:
./ngrok tcp 22
tcp://0.tcp.ngrok.io:
There are a couple of ways.
You can either:
1) Visit localhost:4040/status in your browser to see a bunch of information, or
localhost:4040/status
2) Use curl to hit the API: localhost:4040/api/tunnels
localhost:4040/api/tunnels