Skip to main content
GET
/
tunnels
/
{id}
Get
curl --request GET \
  --url https://api.ngrok.com/tunnels/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'ngrok-version: <ngrok-version>'
{
  "id": "<string>",
  "public_url": "<string>",
  "started_at": "<string>",
  "metadata": "<string>",
  "proto": "<string>",
  "region": "<string>",
  "tunnel_session": {
    "id": "<string>",
    "uri": "<string>"
  },
  "endpoint": {
    "id": "<string>",
    "uri": "<string>"
  },
  "labels": {},
  "backends": [
    {
      "id": "<string>",
      "uri": "<string>"
    }
  ],
  "forwards_to": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use the Endpoints endpoints instead. The Tunnels endpoint is deprecated.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

ngrok-version
integer
default:2
required

Path Parameters

id
string
required

a resource identifier

Response

200 - application/json

Get the status of a tunnel by ID

id
string

unique tunnel resource identifier

public_url
string

URL of the ephemeral tunnel's public endpoint

started_at
string

timestamp when the tunnel was initiated in RFC 3339 format

metadata
string

user-supplied metadata for the tunnel defined in the ngrok configuration file. See the tunnel metadata configuration option In API version 0, this value was instead pulled from the top-level metadata configuration option.

proto
string

tunnel protocol for ephemeral tunnels. one of http, https, tcp or tls

region
string

identifier of tune region where the tunnel is running

tunnel_session
object

reference object pointing to the tunnel session on which this tunnel was started

endpoint
object

the ephemeral endpoint this tunnel is associated with, if this is an agent-initiated tunnel

labels
object

the labels the tunnel group backends will match against, if this is a backend tunnel

backends
object[]

tunnel group backends served by this backend tunnel

forwards_to
string

upstream address the ngrok agent forwards traffic over this tunnel to. this may be expressed as a URL or a network address.