Auth
Get the current authenticated principal (user or service account). Works with both session cookies and API keys.
Authorization
apiKey AuthorizationBearer <token>
API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys
In: header
Query Parameters
workspace?string
Workspace to resolve the principal in. Required for user credentials because a user's role is per-workspace. Service accounts carry their workspace in the credential and may omit it.
Match
^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$Length
4 <= length <= 100Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/whoami"{ "kind": "user", "id": "string", "email": "user@example.com", "workspaceId": "string", "workspaceName": "string", "role": "workspace.member"}