> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/n/ngrok.md).

# Ngrok

ngrok provides secure tunnels and ingress. OctoXLabs reads the users of your ngrok account and adds them to the user inventory.

## Use cases

* List the ngrok users.

```
Adapters = ngrok
```

* Find ngrok users who were not active for 90 days.

```
Adapters = ngrok AND NOT LastLogOnTime last now-90d/d
```

## Before you begin

### Network

| Source              | Destination                                           | Port | Protocol |
| ------------------- | ----------------------------------------------------- | ---- | -------- |
| OctoXLabs connector | `api.ngrok.com` (or the host in the Domain parameter) | 443  | HTTPS    |

### Required permissions

| Scope or role            | Permission | Needed for           |
| ------------------------ | ---------- | -------------------- |
| API token of the account | Read       | Users (`/app/users`) |

The frontend instructions only say to generate an API token in the ngrok dashboard. Not verified whether the token needs a specific permission.

## Create credentials in Ngrok

{% stepper %}
{% step %}

### Open the dashboard

Log in to the ngrok dashboard.
{% endstep %}

{% step %}

### Create an API key

Generate an API token for your account and copy it.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                   | Required | Type   | Default       | Description               |
| --------------------------- | -------- | ------ | ------------- | ------------------------- |
| Domain (`domain`)           | No       | String | api.ngrok.com | ngrok API host.           |
| API Token (`api_token`)     | Yes      | String |               | API token.                |
| HTTPS Proxy (`https_proxy`) | No       | String |               | Proxy URL used for HTTPS. |

## Troubleshooting

| Error message                          | Cause                                            | Fix                               |
| -------------------------------------- | ------------------------------------------------ | --------------------------------- |
| Failed to fetch users:                 | The users call returned a status other than 200. | Check the API token.              |
| Request failed after 5 retries for url | The API kept returning 429 (rate limit).         | Wait and run the discovery again. |

## Change history

{% hint style="info" %}
Available starting from version 6.1.0.
{% endhint %}
