Skip to content
Get started

Test authentication

GET/auth/test

Simple endpoint to test if authentication credentials are valid. Returns authentication status, company/user info, and the scopes granted to the token. Useful for debugging during development.

Header ParametersExpand Collapse
"rotor-api-version": "1.1.0"
ReturnsExpand Collapse
auth_method: optional "api_key" or "unknown"
One of the following:
"api_key"
"unknown"
authenticated: optional boolean
company_id: optional string
message: optional string
rotor_api_version: optional string
scopes: optional array of string

Scopes granted to this token

status: optional string
timestamp: optional string
user_id: optional string

Null for API key authentication

formatuuid

Test authentication

curl https://api.getrotor.com/open-api/auth/test \
    -H "x-api-key: $ROTOR_API_KEY"
{
  "status": "success",
  "message": "Authentication successful",
  "authenticated": true,
  "company_id": "550e8400-e29b-41d4-a716-446655440000",
  "user_id": null,
  "auth_method": "api_key",
  "scopes": [
    "leads:read",
    "customers:read"
  ],
  "timestamp": "2026-01-15T14:30:00Z"
}
{
  "status": "error",
  "message": "Authentication required. Provide x-api-key header.",
  "error_code": "AUTHENTICATION_REQUIRED"
}
{
  "status": "error",
  "message": "Daily API key request limit of 1000 exceeded",
  "error_code": "RATE_LIMIT_EXCEEDED"
}
Returns Examples
{
  "status": "success",
  "message": "Authentication successful",
  "authenticated": true,
  "company_id": "550e8400-e29b-41d4-a716-446655440000",
  "user_id": null,
  "auth_method": "api_key",
  "scopes": [
    "leads:read",
    "customers:read"
  ],
  "timestamp": "2026-01-15T14:30:00Z"
}
{
  "status": "error",
  "message": "Authentication required. Provide x-api-key header.",
  "error_code": "AUTHENTICATION_REQUIRED"
}
{
  "status": "error",
  "message": "Daily API key request limit of 1000 exceeded",
  "error_code": "RATE_LIMIT_EXCEEDED"
}