List Auth Tokens
List all agent auth tokens belonging to the calling user. These are the credentials a tunnel-server agent presents at handshake — the agent reads them from the API_TOKEN environment variable. Distinct from account-level API keys (used for REST authentication via X-API-KEY).
Account scope: agent auth tokens belong to your active account and are shared with its members per your role's permissions. Use switch account to manage tokens in a different account.
A token can be bound to a specific endpoint or tunnel — the tunnel-server validates the binding at handshake and rejects if mismatched. Unbound tokens (endpoint_id: null) work for any endpoint owned by the user; useful for ephemeral / one-shot tunnels created via ngris.connect().
Response (200 OK)
items array
Tokens ordered by
created_at DESC.items[].id int64
Numeric ID. Used in DELETE /v1/keys/auth/{id}.
items[].auth_token string
Masked token value. The full token is only returned at creation time.
items[].description string
Free-form label.
items[].endpoint_id int64 | null
Endpoint this token is bound to.
null = usable on any endpoint owned by the user.items[].tunnel_id int64 | null
Tunnel this token is bound to. Rare — most tokens are endpoint-scoped or unbound.
items[].status string
active | revoked. Revoked tokens are kept in the table for audit purposes but won't authenticate.items[].created_at, last_used_at datetime
RFC 3339 timestamps.
last_used_at is updated whenever the agent successfully handshakes with this token.Errors
401 Unauthorized
Missing auth.
Request
curl "https://api.ngris.com/v1/keys/auth" \
-H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
toks = client.api_keys.list_auth_tokens()
for t in toks["items"]:
binding = f"endpoint:{t['endpoint_id']}" if t["endpoint_id"] else "unbound"
print(f"#{t['id']} {t['description']} ({binding}, {t['status']})")
Response — 200 OK
{
"items": [
{
"id": 7,
"auth_token": "et_at_a1b2...f6e7",
"description": "ci pipeline",
"endpoint_id": null,
"tunnel_id": null,
"status": "active",
"created_at": "2026-04-29T10:00:00Z",
"last_used_at": "2026-04-29T12:34:56Z"
}
]
}