Revoke Auth Token

DELETE /v1/keys/auth/{id}

Revoke an agent auth token. Any agent currently holding an active connection authenticated with this token is not immediately disconnected — its tunnel keeps flowing until the agent reconnects, at which point handshake fails with 401. To force-disconnect a live agent, use the dashboard's "kill tunnel" action instead.

Idempotent: a 404 is treated as success by the SDK so you can call this in a teardown loop without checking whether the token still exists. The Python SDK calls this automatically when a ngris.connect() tunnel is closed.

Path parameters

id int64 Req
Numeric ID of the auth token. Get from /keys/auth or the response of /keys/auth.

Response (204 No Content)

Empty body on success.

Errors

400 Bad Request
Non-numeric ID.
401 Unauthorized
Missing auth.
404 Not Found
Token doesn't exist or doesn't belong to the calling user. SDK clients silently treat this as success.
Request
curl -X DELETE "https://api.ngris.com/v1/keys/auth/7" \ -H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") client.api_keys.delete_auth_token(7)
Response — 204 No Content
On this page
Revoke Auth Token
Iris