Skip to Content
ReferenceAPI referenceAuth

Check credentials and configured API features

GET
/api/v1/auth/connection

Returns the app/API version and configured features without checking external services. API-key requests also return that key's name, scope and expiry. Invalid or expired keys get a coded 401 before this handler runs. Browser sessions return mode=session. With APP_AUTH_DISABLED=true, mode=disabled means a supplied key has not been validated.

Authorization

cookiesession<token>

Session cookie authentication.

Response Body

Request fulfilled, document follows

application/json
  1. response

A successfully authenticated API key. An expired key gets a 401 instead.

apiVersion*string
appVersion*string
capabilities*array<>

Configured server features, independent of key scope and current service availability. crowdsecWrite also requires a read_write key or a browser session when auth is enabled.

expiresAt*|

The key's expiry, or null if it never expires.

mode*string
name*string
scope*string
Value in"read""read_write"
Example Request
curl -X GET 'https://geometrikks.example.com/api/v1/auth/connection'
Example Response
{  "apiVersion": "string",  "appVersion": "string",  "capabilities": [    "crowdsec"  ],  "expiresAt": "2019-08-24T14:15:22Z",  "mode": "apiKey",  "name": "string",  "scope": "read"}