Skip to navigation

Get the current user

View as Markdown

Returns the profile of the user identified by the bearer token. Works for both JWT and API key authentication.

Personal access tokens (lct_pat_*) return their owning user. Workspace tokens (lct_live_*) return the user that issued the token — clients should not assume a 1:1 mapping between token and user for workspace tokens.

Authentication

AuthorizationBearer

JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.

OR
AuthorizationBearer

Lucanto API key. Two prefixes:

  • lct_pat_<random><checksum> — personal access token (owner: User)
  • lct_live_<random><checksum> — workspace token, live data

Issue keys at /settings/api_keys (personal) or /:workspace_id/settings/api_keys (workspace). Plaintext token is shown once and never again.

Response

OK
idlong
Internal user ID. Stable across token rotations.
emailstringformat: "email"

The user’s primary email address (used as the login identifier).

languageenum

The user’s preferred UI language. Sets the language of the app and of the e-mails Lucanto sends to this user. PDF documents and customer e-mails follow the document’s own pdf_language (sk, cs, en, ro, uk, de, fr); a document without one uses the workspace’s country language.

localestring

Regional format for dates and amounts, a language-region tag such as en-GB. Independent of language.

connected_providerslist of strings

List of OAuth providers connected to this user. Empty array if the user registered with email/password and never connected any provider.

password_setboolean

true if the user has set a password (either at registration or after the fact). false only for users who registered via OAuth and have never set a password — they can’t use the password reset flow without first setting one.

email_confirmedboolean

true once the account’s e-mail has been confirmed (the link in the confirmation e-mail, or a Google/Apple sign-in with a verified address). An unconfirmed account can use the app; a client should show a reminder and may offer POST /auth/confirmation/resend.

email_deliverableboolean

false when the confirmation e-mail or a reminder bounced or was marked as spam at the CURRENT address — resending will not help; the user must correct email (PATCH /user, unconfirmed accounts only). true otherwise.

created_atdatetime
updated_atdatetime
namestring or nullOptional
The user's display name. Nil for users who registered via OAuth and have not yet completed their profile.
avatar_urlstring or nullOptionalformat: "uri"

Signed URL for the user’s avatar image (ActiveStorage blob URL). null when no avatar is attached. URLs are time-limited — re-fetch the user record to get a fresh URL.

Errors

401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error