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(ctx) (*AuthValidateResponse, error)
GET/v1/auth/validate
ModelsExpand Collapse
type AuthValidateResponse struct{…}
Active bool

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

Scopes []string

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

SubjectType AuthValidateResponseSubjectType

Whether the API key belongs to a user or workspace.

One of the following:
const AuthValidateResponseSubjectTypeUser AuthValidateResponseSubjectType = "user"
const AuthValidateResponseSubjectTypeWorkspace AuthValidateResponseSubjectType = "workspace"
TokenType AuthValidateResponseTokenType

Credential family, always api_key.