Skip to content

Auth

Auth helper to validate the current token and describe the access it grants. This endpoint is currently only available for API keys.

Validate current API key
client.auth.validate(RequestOptionsoptions?): AuthValidateResponse { active, scopes, subjectType, tokenType }
GET/v1/auth/validate
ModelsExpand Collapse
AuthValidateResponse { active, scopes, subjectType, tokenType }
active: boolean

Whether the current API key is valid. Always true on successful responses.

scopes: Array<string>

Granted public scopes for the current API key. Empty when the key has full access.

subjectType: "user" | "workspace"

Whether the API key belongs to a user or workspace.

One of the following:
"user"
"workspace"
tokenType: "api_key"

Credential family, always api_key.