Revoke Auth Token
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
uuid string (uuid) Req
Deprecated: the legacy integer id is still accepted in the path until the sunset, answered with Deprecation and Sunset headers. Use the uuid.
Response (204 No Content)
Empty body on success.
Errors
400 Bad Request
An integer id after the sunset (
integer_id_unsupported).401 Unauthorized
Missing auth.
404 Not Found
Token doesn't exist or doesn't belong to your active account (another account's uuid reads exactly like an unknown one). SDK clients silently treat this as success.
Request
curl -X DELETE "https://api.ngris.com/v1/keys/auth/019ae915-a554-7fc4-aea3-9c9ce2dd2976" \
-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("019ae915-a554-7fc4-aea3-9c9ce2dd2976")
Response — 204 No Content
Was this helpful?