ngrok

App · 25 actions

Manage ngrok endpoints, agents, reserved domains and TCP addresses, API keys and IP policies, and follow new endpoints, agents and tunnels.

Actions

ActionWhat it does
Add IP policy ruleAdd a rule to an IP policy that allows or denies an IP address or range.
Create API keyCreate an ngrok API key.
Create cloud endpointCreate an always-on cloud endpoint at a URL, with the Traffic Policy that answers its requests.
Create IP policyCreate an IP policy, a named set of allow and deny rules for IP addresses.
Delete API keyDelete an API key.
Delete cloud endpointDelete a cloud endpoint.
Delete IP policyDelete an IP policy.
Delete IP policy ruleDelete one rule from an IP policy.
Get endpointGet an endpoint's URL, type, bindings, Traffic Policy and what serves it.
Get reserved domainGet a reserved domain and the DNS target to point a custom domain at.
List agentsList the ngrok agents online now (tunnel sessions): where each runs, its version and IP address.
List API keysList the account's API keys, newest first.
List endpointsList the account's online endpoints: agent endpoints and cloud endpoints, newest first.
List IP policiesList the account's IP policies, newest first.
List reserved addressesList the TCP addresses reserved in the account, newest first.
List reserved domainsList the domains reserved in the account, newest first.
List tunnelsList the tunnels the account's online agents have open, newest first.
Release reserved domainRelease a reserved domain from the account.
Release reserved TCP addressRelease a reserved TCP address from the account.
Reserve domainReserve a domain for the account: a subdomain of an ngrok domain, such as shop.ngrok.app, or a domain of your own.
Reserve TCP addressReserve a fixed TCP address (host and port) for the account, in the region you choose.
Restart agentTell an online agent to restart.
Stop agentTell an online agent to exit.
Update cloud endpointChange a cloud endpoint's URL, Traffic Policy, description or metadata.
Update reserved domainChange a reserved domain's description or metadata.

Add IP policy rule

Add a rule to an IP policy that allows or denies an IP address or range.

Inputs

IP policyip_policy_idtextRequired
The IP policy.
IP address or rangecidrtextRequired
The IP address or range in CIDR notation, such as 203.0.113.7/32 or 2001:db8::/32.
Actionrule_actiontextRequired
Whether the rule lets the addresses in or keeps them out.One of: allow, deny.
Descriptiondescriptiontext
A note on what it's for, up to 255 characters.
Metadatametadatatext
Your own data to keep with it, such as a JSON string, up to 4096 characters.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "action": "example",
    "cidr": "example",
    "created_at": "example",
    "description": "example",
    "id": "example",
    "ip_policy": {
      "id": "example",
      "uri": "example"
    },
    "metadata": "example",
    "uri": "example"
  }
}

Create API key

Create an ngrok API key. Its token is in the result this once and can't be read again.

Inputs

Descriptiondescriptiontext
A note on what it's for, up to 255 characters.
Metadatametadatatext
Your own data to keep with it, such as a JSON string, up to 4096 characters.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "metadata": "example",
    "owner_id": "example",
    "token": "example",
    "uri": "example"
  }
}

Create cloud endpoint

Create an always-on cloud endpoint at a URL, with the Traffic Policy that answers its requests.

Inputs

URLurltextRequired
The endpoint's URL, such as https://shop.internal or https://example.ngrok.app. A public URL needs a domain reserved in the account.
Traffic Policytraffic_policytextRequired
The endpoint's Traffic Policy, in YAML or JSON. A cloud endpoint's policy must answer every request itself, for example with a custom-response, redirect or forward-internal action.
Reachable frombindingtext
Who can reach the endpoint: anyone on the internet (public), only your other ngrok endpoints (internal, for URLs ending in .internal), or a Kubernetes cluster running the ngrok operator.One of: public (Public (the internet)), internal (Internal (other ngrok endpoints)), kubernetes (Kubernetes cluster).
Descriptiondescriptiontext
A note on what it's for, up to 255 characters.
Metadatametadatatext
Your own data to keep with it, such as a JSON string, up to 4096 characters.
Allow poolingpooling_enabledtrue/false
Let other endpoints with the same URL share its traffic.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "bindings": [
      "example"
    ],
    "created_at": "example",
    "description": "example",
    "domain": {
      "id": "example",
      "uri": "example"
    },
    "edge": {
      "id": "example",
      "uri": "example"
    },
    "hostport": "example",
    "id": "example",
    "metadata": "example",
    "name": "example",
    "pooling_enabled": true,
    "principal": {
      "id": "example",
      "uri": "example"
    },
    "proto": "example",
    "public_url": "example",
    "region": "example",
    "tcp_addr": {
      "id": "example",
      "uri": "example"
    },
    "traffic_policy": "example",
    "tunnel": {
      "id": "example",
      "uri": "example"
    },
    "tunnel_session": {
      "id": "example",
      "uri": "example"
    },
    "type": "example",
    "updated_at": "example",
    "upstream_protocol": "example",
    "upstream_url": "example",
    "uri": "example",
    "url": "example"
  }
}

Create IP policy

Create an IP policy, a named set of allow and deny rules for IP addresses.

Inputs

Descriptiondescriptiontext
A note on what it's for, up to 255 characters.
Metadatametadatatext
Your own data to keep with it, such as a JSON string, up to 4096 characters.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "metadata": "example",
    "uri": "example"
  }
}

Delete API key

Delete an API key. Anything using it loses access to the ngrok API at once.

Inputs

API keyapi_key_idtextRequired
The API key.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Delete cloud endpoint

Delete a cloud endpoint. Its URL stops answering at once.

Inputs

Cloud endpointendpoint_idtextRequired
The cloud endpoint.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Delete IP policy

Delete an IP policy.

Inputs

IP policyip_policy_idtextRequired
The IP policy.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Delete IP policy rule

Delete one rule from an IP policy.

Inputs

IP policy ruleip_policy_rule_idtextRequired
The IP policy rule.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Get endpoint

Get an endpoint's URL, type, bindings, Traffic Policy and what serves it.

Inputs

Endpointendpoint_idtextRequired
The endpoint.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "bindings": [
      "example"
    ],
    "created_at": "example",
    "description": "example",
    "domain": {
      "id": "example",
      "uri": "example"
    },
    "edge": {
      "id": "example",
      "uri": "example"
    },
    "hostport": "example",
    "id": "example",
    "metadata": "example",
    "name": "example",
    "pooling_enabled": true,
    "principal": {
      "id": "example",
      "uri": "example"
    },
    "proto": "example",
    "public_url": "example",
    "region": "example",
    "tcp_addr": {
      "id": "example",
      "uri": "example"
    },
    "traffic_policy": "example",
    "tunnel": {
      "id": "example",
      "uri": "example"
    },
    "tunnel_session": {
      "id": "example",
      "uri": "example"
    },
    "type": "example",
    "updated_at": "example",
    "upstream_protocol": "example",
    "upstream_url": "example",
    "uri": "example",
    "url": "example"
  }
}

Get reserved domain

Get a reserved domain and the DNS target to point a custom domain at.

Inputs

Reserved domainreserved_domain_idtextRequired
The reserved domain.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "acme_challenge_cname_target": "example",
    "cname_target": "example",
    "created_at": "example",
    "description": "example",
    "domain": "example",
    "id": "example",
    "metadata": "example",
    "uri": "example"
  }
}

List agents

List the ngrok agents online now (tunnel sessions): where each runs, its version and IP address.

Inputs

How manylimitnumber
How many to return. Leave empty for ngrok's default page.At least 1.
Before IDbefore_idtext
For the next page: the ID of the last entry of the page before. Lists come newest first.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "next_page_uri": "example",
    "tunnel_sessions": [
      {
        "agent_version": "example",
        "credential": {
          "id": "example",
          "uri": "example"
        },
        "id": "example",
        "ip": "example",
        "metadata": "example",
        "os": "example",
        "region": "example",
        "started_at": "example",
        "transport": "example",
        "uri": "example"
      }
    ],
    "uri": "example"
  }
}

List API keys

List the account's API keys, newest first. Their secret tokens aren't shown.

Inputs

How manylimitnumber
How many to return. Leave empty for ngrok's default page.At least 1.
Before IDbefore_idtext
For the next page: the ID of the last entry of the page before. Lists come newest first.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "keys": [
      {
        "created_at": "example",
        "description": "example",
        "id": "example",
        "metadata": "example",
        "owner_id": "example",
        "token": "example",
        "uri": "example"
      }
    ],
    "next_page_uri": "example",
    "uri": "example"
  }
}

List endpoints

List the account's online endpoints: agent endpoints and cloud endpoints, newest first.

Inputs

How manylimitnumber
How many to return. Leave empty for ngrok's default page.At least 1.
Before IDbefore_idtext
For the next page: the ID of the last entry of the page before. Lists come newest first.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "endpoints": [
      {
        "bindings": [
          "example"
        ],
        "created_at": "example",
        "description": "example",
        "domain": {
          "id": "example",
          "uri": "example"
        },
        "edge": {
          "id": "example",
          "uri": "example"
        },
        "hostport": "example",
        "id": "example",
        "metadata": "example",
        "name": "example",
        "pooling_enabled": true,
        "principal": {
          "id": "example",
          "uri": "example"
        },
        "proto": "example",
        "public_url": "example",
        "region": "example",
        "tcp_addr": {
          "id": "example",
          "uri": "example"
        },
        "traffic_policy": "example",
        "tunnel": {
          "id": "example",
          "uri": "example"
        },
        "tunnel_session": {
          "id": "example",
          "uri": "example"
        },
        "type": "example",
        "updated_at": "example",
        "upstream_protocol": "example",
        "upstream_url": "example",
        "uri": "example",
        "url": "example"
      }
    ],
    "next_page_uri": "example",
    "uri": "example"
  }
}

List IP policies

List the account's IP policies, newest first.

Inputs

How manylimitnumber
How many to return. Leave empty for ngrok's default page.At least 1.
Before IDbefore_idtext
For the next page: the ID of the last entry of the page before. Lists come newest first.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "ip_policies": [
      {
        "created_at": "example",
        "description": "example",
        "id": "example",
        "metadata": "example",
        "uri": "example"
      }
    ],
    "next_page_uri": "example",
    "uri": "example"
  }
}

List reserved addresses

List the TCP addresses reserved in the account, newest first.

Inputs

How manylimitnumber
How many to return. Leave empty for ngrok's default page.At least 1.
Before IDbefore_idtext
For the next page: the ID of the last entry of the page before. Lists come newest first.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "next_page_uri": "example",
    "reserved_addrs": [
      {
        "addr": "example",
        "created_at": "example",
        "description": "example",
        "id": "example",
        "metadata": "example",
        "region": "example",
        "uri": "example"
      }
    ],
    "uri": "example"
  }
}

List reserved domains

List the domains reserved in the account, newest first.

Inputs

How manylimitnumber
How many to return. Leave empty for ngrok's default page.At least 1.
Before IDbefore_idtext
For the next page: the ID of the last entry of the page before. Lists come newest first.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "next_page_uri": "example",
    "reserved_domains": [
      {
        "acme_challenge_cname_target": "example",
        "cname_target": "example",
        "created_at": "example",
        "description": "example",
        "domain": "example",
        "id": "example",
        "metadata": "example",
        "uri": "example"
      }
    ],
    "uri": "example"
  }
}

List tunnels

List the tunnels the account's online agents have open, newest first.

Inputs

How manylimitnumber
How many to return. Leave empty for ngrok's default page.At least 1.
Before IDbefore_idtext
For the next page: the ID of the last entry of the page before. Lists come newest first.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "next_page_uri": "example",
    "tunnels": [
      {
        "endpoint": {
          "id": "example",
          "uri": "example"
        },
        "forwards_to": "example",
        "id": "example",
        "metadata": "example",
        "proto": "example",
        "public_url": "example",
        "region": "example",
        "started_at": "example",
        "tunnel_session": {
          "id": "example",
          "uri": "example"
        }
      }
    ],
    "uri": "example"
  }
}

Release reserved domain

Release a reserved domain from the account. Someone else may then reserve it.

Inputs

Reserved domainreserved_domain_idtextRequired
The reserved domain.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Release reserved TCP address

Release a reserved TCP address from the account.

Inputs

Reserved addressreserved_address_idtextRequired
The reserved TCP address.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}

Reserve domain

Reserve a domain for the account: a subdomain of an ngrok domain, such as shop.ngrok.app, or a domain of your own.

Inputs

DomaindomaintextRequired
The hostname to reserve, such as shop.ngrok.app or app.example.com.
Descriptiondescriptiontext
A note on what it's for, up to 255 characters.
Metadatametadatatext
Your own data to keep with it, such as a JSON string, up to 4096 characters.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "acme_challenge_cname_target": "example",
    "cname_target": "example",
    "created_at": "example",
    "description": "example",
    "domain": "example",
    "id": "example",
    "metadata": "example",
    "uri": "example"
  }
}

Reserve TCP address

Reserve a fixed TCP address (host and port) for the account, in the region you choose.

Inputs

Regionregiontext
The region to reserve it in. Leave empty for the United States.One of: us (United States (Ohio)), eu (Europe (Frankfurt)), ap (Asia/Pacific (Singapore)), au (Australia (Sydney)), jp (Japan (Tokyo)), in (India (Mumbai)), sa (South America (São Paulo)).
Descriptiondescriptiontext
A note on what it's for, up to 255 characters.
Metadatametadatatext
Your own data to keep with it, such as a JSON string, up to 4096 characters.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "addr": "example",
    "created_at": "example",
    "description": "example",
    "id": "example",
    "metadata": "example",
    "region": "example",
    "uri": "example"
  }
}

Restart agent

Tell an online agent to restart. It reconnects as a new agent session. Not supported on Windows.

Inputs

Agentagent_idtextRequired
The online agent (tunnel session).

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "id": "example",
    "sent": true
  }
}

Stop agent

Tell an online agent to exit. Its tunnels close until someone starts it again.

Inputs

Agentagent_idtextRequired
The online agent (tunnel session).

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "id": "example",
    "sent": true
  }
}

Update cloud endpoint

Change a cloud endpoint's URL, Traffic Policy, description or metadata. Only the fields filled in change.

Inputs

Cloud endpointendpoint_idtextRequired
The cloud endpoint.
URLurltext
A new URL for the endpoint.
Traffic Policytraffic_policytext
The endpoint's Traffic Policy, in YAML or JSON. A cloud endpoint's policy must answer every request itself, for example with a custom-response, redirect or forward-internal action.
Reachable frombindingtext
Who can reach the endpoint: anyone on the internet (public), only your other ngrok endpoints (internal, for URLs ending in .internal), or a Kubernetes cluster running the ngrok operator.One of: public (Public (the internet)), internal (Internal (other ngrok endpoints)), kubernetes (Kubernetes cluster).
Descriptiondescriptiontext
A note on what it's for, up to 255 characters.
Metadatametadatatext
Your own data to keep with it, such as a JSON string, up to 4096 characters.
Allow poolingpooling_enabledtrue/false
Let other endpoints with the same URL share its traffic.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "bindings": [
      "example"
    ],
    "created_at": "example",
    "description": "example",
    "domain": {
      "id": "example",
      "uri": "example"
    },
    "edge": {
      "id": "example",
      "uri": "example"
    },
    "hostport": "example",
    "id": "example",
    "metadata": "example",
    "name": "example",
    "pooling_enabled": true,
    "principal": {
      "id": "example",
      "uri": "example"
    },
    "proto": "example",
    "public_url": "example",
    "region": "example",
    "tcp_addr": {
      "id": "example",
      "uri": "example"
    },
    "traffic_policy": "example",
    "tunnel": {
      "id": "example",
      "uri": "example"
    },
    "tunnel_session": {
      "id": "example",
      "uri": "example"
    },
    "type": "example",
    "updated_at": "example",
    "upstream_protocol": "example",
    "upstream_url": "example",
    "uri": "example",
    "url": "example"
  }
}

Update reserved domain

Change a reserved domain's description or metadata.

Inputs

Reserved domainreserved_domain_idtextRequired
The reserved domain.
Descriptiondescriptiontext
A note on what it's for, up to 255 characters.
Metadatametadatatext
Your own data to keep with it, such as a JSON string, up to 4096 characters.

Outputs

dataobject
The response from ngrok.
Example output
{
  "data": {
    "acme_challenge_cname_target": "example",
    "cname_target": "example",
    "created_at": "example",
    "description": "example",
    "domain": "example",
    "id": "example",
    "metadata": "example",
    "uri": "example"
  }
}

On this page