# Auth ## Validate current API key `auth.validate() -> AuthValidateResponse` **get** `/v1/auth/validate` Returns metadata for the current API key, including the subject type and granted public scopes. Use this endpoint to confirm a key is active before making scoped API requests. **[Required scope](/using-the-api/scopes/):** None **[Rate limit category](/using-the-api/rate-limits/):** Read ### Returns - `class AuthValidateResponse: …` - `active: bool` Whether the current API key is valid. Always `true` on successful responses. - `scopes: List[str]` Granted public scopes for the current API key. Empty when the key has full access. - `subject_type: Literal["user", "workspace"]` Whether the API key belongs to a `user` or `workspace`. - `"user"` - `"workspace"` - `token_type: Literal["api_key"]` Credential family, always `api_key`. - `"api_key"` ### Example ```python from lightfield import Lightfield client = Lightfield( api_key="My API Key", ) auth_validate_response = client.auth.validate() print(auth_validate_response.active) ``` #### Response ```json { "active": true, "scopes": [ "string" ], "subjectType": "user", "tokenType": "api_key" } ``` ## Domain Types ### Auth Validate Response - `class AuthValidateResponse: …` - `active: bool` Whether the current API key is valid. Always `true` on successful responses. - `scopes: List[str]` Granted public scopes for the current API key. Empty when the key has full access. - `subject_type: Literal["user", "workspace"]` Whether the API key belongs to a `user` or `workspace`. - `"user"` - `"workspace"` - `token_type: Literal["api_key"]` Credential family, always `api_key`. - `"api_key"`