Appearance
Are you an LLM? You can read better optimized documentation at /sdk-api-user.md for this page in Markdown format
HubUserClient
Part of the Kipu Quantum Hub API SDK reference - see the landing page for installation and Python credential helpers.
HubUserClient talks to the user-service. Use it to read the currently-authenticated user's profile, manage personal access tokens, resolve user identities, and search the user directory.
Authentication
HubUserClient authenticates with a personal access token sent as the X-Auth-Token request header. The same Python credential helpers documented under Python credential helpers work here - pass the resolved token via api_key.
The users, user_registration_status, and authentication namespaces are public/registration-oriented and do not require an authenticated principal; the remaining namespaces operate on the current user and do.
Quickstart
Fetch the current user and list their personal access tokens.
python
from qhub.api.user import HubUserClient
user = HubUserClient(api_key="YOUR_PERSONAL_ACCESS_TOKEN")
me = user.user_settings.get_current_user()
tokens = user.user_settings_personal_access_tokens.get_personal_access_tokens()
print(me.email, [t.name for t in tokens.access_tokens or []])Constructor
| Parameter | Required | Description |
|---|---|---|
api_key / apiKey | yes | Personal access token; sent as X-Auth-Token. |
base_url / baseUrl | no | Overrides both the default environment and environment if supplied. |
environment | no | HubUserClientEnvironment.DEFAULT (Python) / HubUserEnvironment.Default (TypeScript). |
headers | no | Additional headers merged into every request. |
timeout / timeoutInSeconds | no | Read timeout in seconds; defaults to 60 when no custom HTTP client is supplied. |
max_retries / maxRetries | no | Number of retries for transient failures; defaults to 2. |
follow_redirects | no (Python only) | Passed through to httpx.Client; defaults to True. |
httpx_client / fetch | no | Inject a preconfigured HTTP client (Python) or fetch implementation (TypeScript). |
logging | no | Logger instance or {level, logger, silent} config dict. |
Python also ships AsyncHubUserClient with the same shape plus an httpx.AsyncClient hook.
Behaviour
base_url/baseUrlalways wins overenvironment; omitting both in Python raisesException("Please pass in either base_url or environment to construct the client").check_user_existsis aHEADexistence check: it returns the response headers (Dict[str, str]in Python, aHeadersobject in TypeScript) when the user exists and raisesNotFoundError(404) otherwise - treat a thrownNotFoundError, not a falsy return, as "does not exist".get_user_profile_imagereturns a nullable string (Optional[str]/string | undefined), not raw bytes; the value is absent when the user has no profile image.- A personal access token's raw
valueis returned only once, at creation or default-token regeneration; subsequent reads omit it.
Namespaces
| Namespace | Purpose |
|---|---|
user_settings | Current-user profile: get, update, delete, manage profile image. |
user_settings_personal_access_tokens | List, create, delete, and regenerate personal access tokens for the current user. |
authentication | Resolve the principal for a personal access token. |
users | Look up users by id, check existence, fetch profile images. |
user_registration_status | Read the registration status of a user by email. |
search | Search the user directory. |
TypeScript exposes the same namespaces in camelCase (userSettings, userSettingsPersonalAccessTokens, authentication, users, userRegistrationStatus, search).
Current user profile
Operations on the currently-authenticated user, under the user_settings (Python) / userSettings (TypeScript) namespace.
| Method | Description |
|---|---|
user_settings.get_current_user() | Full profile of the current user. |
user_settings.update_current_user(current_position=?, homepage=?, about=?) | Update editable profile fields. |
user_settings.delete_current_user() | Permanently delete the current user. |
user_settings.update_current_user_profile_image(file=...) | Upload or replace the profile image. |
user_settings.delete_current_user_profile_image() | Delete the profile image. |
Personal access tokens
Manage the current user's personal access tokens (PATs), under the user_settings_personal_access_tokens (Python) / userSettingsPersonalAccessTokens (TypeScript) namespace.
| Method | Description |
|---|---|
user_settings_personal_access_tokens.get_personal_access_tokens() | List all PATs plus the default token value. |
user_settings_personal_access_tokens.create_personal_access_token(name=..., expires_at=?) | Create a new PAT; raw value returned once. |
user_settings_personal_access_tokens.delete_personal_access_token(id) | Delete a PAT by id. |
user_settings_personal_access_tokens.regenerate_default_personal_access_token() | Rotate the default PAT. |
Principal resolution
Resolve a personal access token into an authenticated principal, under the authentication namespace. This is an internal/gateway-oriented endpoint: it validates the PAT carried in the X-Auth-Token header and returns the resolved user.
User lookup
Public read access to user profiles and profile images, under the users namespace.
| Method | Description |
|---|---|
users.resolve_users(ids=[...]) | Resolve many users in one request. |
users.get_user_by_id(id) | Public overview of a user. |
users.check_user_exists(id) | HEAD-style existence check. |
users.get_user_profile_image(id) | Fetch a user's profile image. |
User registration status
Read the registration state of a user identified by email, under the user_registration_status (Python) / userRegistrationStatus (TypeScript) namespace.
User search
Full-text search across user profiles, under the search namespace.
Endpoints
| Default base URL | Override |
|---|---|
https://api.hub.kipu-quantum.com/user-service | base_url=... / baseUrl: ..., or environment=HubUserClientEnvironment.DEFAULT (Python) / environment: HubUserEnvironment.Default (TypeScript). |
Errors
All Python errors extend ApiError (in qhub.api.user.core.api_error); all TypeScript errors extend HubUserError.
| Status | Python class | TypeScript class | Meaning |
|---|---|---|---|
| 400 | BadRequestError | BadRequestError | Malformed request. |
| 401 | UnauthorizedError | UnauthorizedError | Missing or invalid credentials. |
| 403 | ForbiddenError | ForbiddenError | Authenticated but not permitted. |
| 404 | NotFoundError | NotFoundError | Resource does not exist. |
Other failure modes:
- Auth misconfiguration (TypeScript) - constructing
HubUserClientwithoutapiKeythrowsHubUserErrorwith message"Please provide 'apiKey' when initializing the client". - Timeouts - hitting
timeoutInSecondsraisesHubUserTimeoutErrorin TypeScript; in Python, timeouts surface as the underlyinghttpx.TimeoutException.
All HTTP error instances expose status_code, headers, and body (Python) / statusCode, rawResponse, and body (TypeScript).
Reference
UserDto
Full profile of the currently-authenticated user.
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| id | id | str? | Unique id (identity-provider subject). |
| username | username | str? | Login name (typically the email). |
email | str? | Email address (identity-provider managed). | |
| firstname | firstname | str? | First (given) name. |
| lastname | lastname | str? | Last (family) name. |
| current_position | current_position / currentPosition | str? | Current professional position or role. |
| homepage | homepage | str? | Personal or professional homepage. |
| about | about | str? | Short biography. |
AccessTokenDto
A personal access token belonging to a user.
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| id | id | str? | Unique id of the token. |
| name | name | str | Human-readable token name. |
| created_at | created_at / createdAt | str? | Creation timestamp (yyyy-MM-dd HH:mm:ss, UTC). |
| used_at | used_at / usedAt | str? | Last-used timestamp; null if never used. |
| expires_at | expires_at / expiresAt | str? | Expiry (yyyy-MM-dd); null means never expires. |
| value | value | str? | Raw token value; returned only once at creation, null on reads. |
AccessTokensDto
Container for a user's personal access tokens plus the raw default-token value.
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| default_token | default_token / defaultToken | str? | Raw value of the current default PAT. |
| access_tokens | access_tokens / accessTokens | List[AccessTokenDto]? | All PATs for the user; may be empty. |
DefaultAccessTokenDto
Response wrapping a newly-generated default personal access token value.
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| default_token | default_token / defaultToken | str? | Raw value of the regenerated default PAT (returned once). |
PersonalAccessTokenPrincipal
Authenticated principal resolved from a personal access token.
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| id | id | str? | Unique id of the authenticated user. |
| access_token | access_token / accessToken | AccessTokenDto? | Metadata of the PAT used to authenticate; raw value never included. |
RegistrationResponse
Registration status of a user, used by the registration flow.
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| status | status | RegistrationResponseStatus? | Current registration status (see Enums). |
| message | message | str? | Human-readable message for the status. |
BatchUserResponseDto
Result of a batch user lookup.
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| users | users | List[UserOverviewDto]? | The overview of each requested id that resolved to an approved user. |
| not_found | not_found / notFound | str? | The requested ids that did not resolve to an approved user - unknown, disabled, unverified, or not approved are not distinguished. |
UserOverviewDto
Minimal public representation of a user.
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| id | id | str? | Unique id. |
| firstname | firstname | str? | First (given) name. |
| lastname | lastname | str? | Last (family) name. |
UserSearchDto
Entry in the user-search result list (returned as a bare array).
| Field | Python / wire name | Type | Description |
|---|---|---|---|
| id | id | str? | Unique id of the match. |
| firstname | firstname | str? | First (given) name. |
| lastname | lastname | str? | Last (family) name. |
Enums
RegistrationResponseStatus-PENDING | APPROVED | REJECTED | NOT_FOUND | EMAIL_NOT_VERIFIED
Field casing
User-API DTOs use snake_case in Python and camelCase in TypeScript. Single-word fields (id, email, firstname, lastname, username, name, value, homepage, about, status, message) are identical across both; the aliased fields are notFound, currentPosition, createdAt, usedAt, expiresAt, defaultToken, accessTokens, and accessToken.
Python reference
User Settings
client.user_settings.get_current_user() -> UserDto
Description
Returns the full profile of the currently authenticated user, including email, personal details, and profile metadata (current position, homepage, about). If the user does not yet exist in the user-service database, it is provisioned just-in-time from the identity provider and then returned.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings.get_current_user()
Parameters
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.user_settings.update_current_user(...) -> UserDto
Description
Updates the editable profile fields (current position, homepage, about) of the currently authenticated user. Core identity fields such as email, first name, and last name are owned by the identity provider and cannot be modified through this endpoint. Returns the user profile with the updated values applied.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings.update_current_user()
Parameters
current_position:
typing.Optional[str]— Current professional position or role of the user. Free-form text intended for display on the user's profile.
homepage:
typing.Optional[str]— Personal or professional homepage of the user. Expected to be a fully qualified URL.
about:
typing.Optional[str]— Short biography or description shown on the user's profile.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.user_settings.delete_current_user()
Description
Permanently deletes the currently authenticated user together with all associated resources (personal access tokens, profile image, profile metadata). The user is also removed from the identity provider. The operation cannot be undone. Responds with
204 No Contentonce the deletion has completed.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings.delete_current_user()
Parameters
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.user_settings.update_current_user_profile_image(...)
Description
Uploads and replaces the profile image of the currently authenticated user. The image is supplied as a multipart form part named
file. Common image formats (e.g. JPEG, PNG) are accepted. Uploading a new image overwrites the previous one. Responds with204 No Contentonce the image has been persisted.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings.update_current_user_profile_image( file="example_file", )
Parameters
file:
core.File— The image file to upload. Common image formats (JPEG, PNG) are accepted.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.user_settings.delete_current_user_profile_image()
Description
Removes the profile image of the currently authenticated user. The operation is idempotent: if no profile image is currently set, the request still succeeds. Responds with
204 No Contentonce the image has been removed.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings.delete_current_user_profile_image()
Parameters
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
User Settings - Personal Access Tokens
client.user_settings_personal_access_tokens.regenerate_default_personal_access_token() -> DefaultAccessTokenDto
Description
Rotates the default personal access token of the currently authenticated user and returns the newly generated raw token value. The previous default token is invalidated immediately — all clients relying on it must be updated. The new value is only returned by this endpoint; it cannot be retrieved later.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings_personal_access_tokens.regenerate_default_personal_access_token()
Parameters
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.user_settings_personal_access_tokens.get_personal_access_tokens() -> AccessTokensDto
Description
Returns all personal access tokens of the currently authenticated user together with the current default access token value. The raw token
valueis only returned immediately after creation and is not included on subsequent reads — long-lived tokens are identifiable only by their id, name, and metadata.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings_personal_access_tokens.get_personal_access_tokens()
Parameters
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.user_settings_personal_access_tokens.create_personal_access_token(...) -> AccessTokenDto
Description
Creates a new personal access token for the currently authenticated user. The raw token
valueis returned exactly once in the response and cannot be retrieved later — clients must persist it immediately after creation. IfexpiresAtis omitted the token does not expire; otherwise the token becomes invalid at the end of the specified day.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings_personal_access_tokens.create_personal_access_token( name="My Access Token", )
Parameters
name:
str— Human-readable name for the token, shown in the user interface to help identify the token's purpose.
expires_at:
typing.Optional[str]— Expiration date of the token in ISO-8601 date format (yyyy-MM-dd). The token becomes invalid at the end of the specified day. If omitted, the token does not expire.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.user_settings_personal_access_tokens.delete_personal_access_token(...)
Description
Permanently deletes the personal access token identified by
id. The token must belong to the currently authenticated user; attempts to delete another user's token are rejected with404 Not Found. Any further request authenticated with the deleted token will fail with401 Unauthorized. The operation cannot be undone.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_settings_personal_access_tokens.delete_personal_access_token( id="a6f3e8a0-1c4b-4d2f-8d5a-1f2e3a4b5c6d", )
Parameters
id:
str— Unique identifier of the personal access token to delete.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
Users
client.users.resolve_users(...) -> BatchUserResponseDto
Description
Resolves a set of user ids in a single request. Returns the public overview (id, first name, last name) of every id that resolves to an approved user, and lists the remaining ids under
notFound. A batch always responds with200, even when no id resolves — a not-found id never fails the request. Duplicate ids are ignored and the batch is bounded to 200 ids.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.users.resolve_users( ids=[ "d8c5f0e2-6d36-4c20-9c9a-8c3d5f0e2b7a" ], )
Parameters
ids:
typing.List[str]— The user ids to resolve. Ids that do not resolve to an approved user are returned innotFound. Duplicates are ignored.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.users.get_user_by_id(...) -> UserOverviewDto
Description
Returns a public overview (id, first name, last name) of the user identified by
id. This endpoint exposes only non-sensitive profile fields and is intended for rendering user references throughout the platform. For the full profile of the authenticated user, useGET /me.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.users.get_user_by_id( id="d8c5f0e2-6d36-4c20-9c9a-8c3d5f0e2b7a", )
Parameters
id:
str— Unique identifier of the user. Typically the Keycloak subject (sub) of the authenticated user.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.users.check_user_exists(...)
Description
Lightweight existence check for a user. Returns
204 No Contentif a user with the given id exists and404 Not Foundotherwise. No response body is ever emitted. Intended for callers that want to validate a user reference without transferring the full user payload.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.users.check_user_exists( id="d8c5f0e2-6d36-4c20-9c9a-8c3d5f0e2b7a", )
Parameters
id:
str— Unique identifier of the user. Typically the Keycloak subject (sub) of the authenticated user.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
client.users.get_user_profile_image(...) -> typing.Optional[str]
Description
Returns the binary profile image of the user identified by
id. The response is served with aCache-Controlheader allowing client-side caching for up to ten days (with mandatory revalidation) to avoid repeated fetches. Responds with204 No Contentif the user exists but has not uploaded a profile image, and404 Not Foundif the user does not exist.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.users.get_user_profile_image( id="d8c5f0e2-6d36-4c20-9c9a-8c3d5f0e2b7a", )
Parameters
id:
str— Unique identifier of the user. Typically the Keycloak subject (sub) of the authenticated user.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
Authentication
client.authentication.authorize_by_personal_access_token() -> PersonalAccessTokenPrincipal
Description
Validates the personal access token supplied in the
X-Auth-Tokenheader and returns the authenticated principal (user id and token metadata). Primarily consumed by internal services (e.g. the API gateway) to resolve a raw access token into the authenticated user context before forwarding the request downstream. Responds with401 Unauthorizedif the token is missing, expired, malformed, or unknown.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.authentication.authorize_by_personal_access_token()
Parameters
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
User Registration Status
client.user_registration_status.get_user_registration_status(...) -> RegistrationResponse
Description
Returns the registration status of a user identified by their email address. Used by the registration flow to determine whether a user exists and, if so, which step the user still has to complete (e.g. verifying their email address or waiting for administrative approval). Possible status values are
PENDING,APPROVED,REJECTED,NOT_FOUND, andEMAIL_NOT_VERIFIED.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.user_registration_status.get_user_registration_status( email="john.doe@example.com", )
Parameters
email:
str— Email address of the user whose registration status should be looked up.
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
Search
client.search.users(...) -> typing.List[UserSearchDto]
Description
Searches for users whose profile matches the supplied query string. Matching is performed case-insensitively against first name, last name, username, and email using a substring match. The result list is capped at a sensible default size; the endpoint does not expose pagination parameters. Returns an empty list if nothing matches — it does not respond with
404.
Usage
- python
from qhub.api.user import HubUserClient from qhub.api.user.environment import HubUserClientEnvironment client = HubUserClient( api_key="<value>", environment=HubUserClientEnvironment.DEFAULT, ) client.search.users( q="john", )
Parameters
q:
str— Free-text query matched against first name, last name, username, and email (case-insensitive, substring match).
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
TypeScript reference
User Settings
client.userSettings.getCurrentUser() -> HubUser.UserDto
Description
Returns the full profile of the currently authenticated user, including email, personal details, and profile metadata (current position, homepage, about). If the user does not yet exist in the user-service database, it is provisioned just-in-time from the identity provider and then returned.
Usage
- typescript
await client.userSettings.getCurrentUser();
Parameters
requestOptions:
UserSettingsClient.RequestOptions
client.userSettings.updateCurrentUser({ ...params }) -> HubUser.UserDto
Description
Updates the editable profile fields (current position, homepage, about) of the currently authenticated user. Core identity fields such as email, first name, and last name are owned by the identity provider and cannot be modified through this endpoint. Returns the user profile with the updated values applied.
Usage
- typescript
await client.userSettings.updateCurrentUser();
Parameters
request:
HubUser.UpdateUserRequest
requestOptions:
UserSettingsClient.RequestOptions
client.userSettings.deleteCurrentUser() -> void
Description
Permanently deletes the currently authenticated user together with all associated resources (personal access tokens, profile image, profile metadata). The user is also removed from the identity provider. The operation cannot be undone. Responds with
204 No Contentonce the deletion has completed.
Usage
- typescript
await client.userSettings.deleteCurrentUser();
Parameters
requestOptions:
UserSettingsClient.RequestOptions
client.userSettings.updateCurrentUserProfileImage({ ...params }) -> void
Description
Uploads and replaces the profile image of the currently authenticated user. The image is supplied as a multipart form part named
file. Common image formats (e.g. JPEG, PNG) are accepted. Uploading a new image overwrites the previous one. Responds with204 No Contentonce the image has been persisted.
Usage
- typescript
await client.userSettings.updateCurrentUserProfileImage({ file: fs.createReadStream("/path/to/your/file") });
Parameters
request:
HubUser.UpdateCurrentUserProfileImageRequest
requestOptions:
UserSettingsClient.RequestOptions
client.userSettings.deleteCurrentUserProfileImage() -> void
Description
Removes the profile image of the currently authenticated user. The operation is idempotent: if no profile image is currently set, the request still succeeds. Responds with
204 No Contentonce the image has been removed.
Usage
- typescript
await client.userSettings.deleteCurrentUserProfileImage();
Parameters
requestOptions:
UserSettingsClient.RequestOptions
User Settings - Personal Access Tokens
client.userSettingsPersonalAccessTokens.regenerateDefaultPersonalAccessToken() -> HubUser.DefaultAccessTokenDto
Description
Rotates the default personal access token of the currently authenticated user and returns the newly generated raw token value. The previous default token is invalidated immediately — all clients relying on it must be updated. The new value is only returned by this endpoint; it cannot be retrieved later.
Usage
- typescript
await client.userSettingsPersonalAccessTokens.regenerateDefaultPersonalAccessToken();
Parameters
requestOptions:
UserSettingsPersonalAccessTokensClient.RequestOptions
client.userSettingsPersonalAccessTokens.getPersonalAccessTokens() -> HubUser.AccessTokensDto
Description
Returns all personal access tokens of the currently authenticated user together with the current default access token value. The raw token
valueis only returned immediately after creation and is not included on subsequent reads — long-lived tokens are identifiable only by their id, name, and metadata.
Usage
- typescript
await client.userSettingsPersonalAccessTokens.getPersonalAccessTokens();
Parameters
requestOptions:
UserSettingsPersonalAccessTokensClient.RequestOptions
client.userSettingsPersonalAccessTokens.createPersonalAccessToken({ ...params }) -> HubUser.AccessTokenDto
Description
Creates a new personal access token for the currently authenticated user. The raw token
valueis returned exactly once in the response and cannot be retrieved later — clients must persist it immediately after creation. IfexpiresAtis omitted the token does not expire; otherwise the token becomes invalid at the end of the specified day.
Usage
- typescript
await client.userSettingsPersonalAccessTokens.createPersonalAccessToken({ name: "My Access Token" });
Parameters
request:
HubUser.CreateAccessTokenRequest
requestOptions:
UserSettingsPersonalAccessTokensClient.RequestOptions
client.userSettingsPersonalAccessTokens.deletePersonalAccessToken(id) -> void
Description
Permanently deletes the personal access token identified by
id. The token must belong to the currently authenticated user; attempts to delete another user's token are rejected with404 Not Found. Any further request authenticated with the deleted token will fail with401 Unauthorized. The operation cannot be undone.
Usage
- typescript
await client.userSettingsPersonalAccessTokens.deletePersonalAccessToken("a6f3e8a0-1c4b-4d2f-8d5a-1f2e3a4b5c6d");
Parameters
id:
string— Unique identifier of the personal access token to delete.
requestOptions:
UserSettingsPersonalAccessTokensClient.RequestOptions
Users
client.users.resolveUsers({ ...params }) -> HubUser.BatchUserResponseDto
Description
Resolves a set of user ids in a single request. Returns the public overview (id, first name, last name) of every id that resolves to an approved user, and lists the remaining ids under
notFound. A batch always responds with200, even when no id resolves — a not-found id never fails the request. Duplicate ids are ignored and the batch is bounded to 200 ids.
Usage
- typescript
await client.users.resolveUsers({ ids: ["d8c5f0e2-6d36-4c20-9c9a-8c3d5f0e2b7a"] });
Parameters
request:
HubUser.BatchUserRequest
requestOptions:
UsersClient.RequestOptions
client.users.getUserById(id) -> HubUser.UserOverviewDto
Description
Returns a public overview (id, first name, last name) of the user identified by
id. This endpoint exposes only non-sensitive profile fields and is intended for rendering user references throughout the platform. For the full profile of the authenticated user, useGET /me.
Usage
- typescript
await client.users.getUserById("d8c5f0e2-6d36-4c20-9c9a-8c3d5f0e2b7a");
Parameters
id:
string— Unique identifier of the user. Typically the Keycloak subject (sub) of the authenticated user.
requestOptions:
UsersClient.RequestOptions
client.users.checkUserExists(id) -> Headers
Description
Lightweight existence check for a user. Returns
204 No Contentif a user with the given id exists and404 Not Foundotherwise. No response body is ever emitted. Intended for callers that want to validate a user reference without transferring the full user payload.
Usage
- typescript
await client.users.checkUserExists("d8c5f0e2-6d36-4c20-9c9a-8c3d5f0e2b7a");
Parameters
id:
string— Unique identifier of the user. Typically the Keycloak subject (sub) of the authenticated user.
requestOptions:
UsersClient.RequestOptions
client.users.getUserProfileImage(id) -> string | undefined
Description
Returns the binary profile image of the user identified by
id. The response is served with aCache-Controlheader allowing client-side caching for up to ten days (with mandatory revalidation) to avoid repeated fetches. Responds with204 No Contentif the user exists but has not uploaded a profile image, and404 Not Foundif the user does not exist.
Usage
- typescript
await client.users.getUserProfileImage("d8c5f0e2-6d36-4c20-9c9a-8c3d5f0e2b7a");
Parameters
id:
string— Unique identifier of the user. Typically the Keycloak subject (sub) of the authenticated user.
requestOptions:
UsersClient.RequestOptions
Authentication
client.authentication.authorizeByPersonalAccessToken() -> HubUser.PersonalAccessTokenPrincipal
Description
Validates the personal access token supplied in the
X-Auth-Tokenheader and returns the authenticated principal (user id and token metadata). Primarily consumed by internal services (e.g. the API gateway) to resolve a raw access token into the authenticated user context before forwarding the request downstream. Responds with401 Unauthorizedif the token is missing, expired, malformed, or unknown.
Usage
- typescript
await client.authentication.authorizeByPersonalAccessToken();
Parameters
requestOptions:
AuthenticationClient.RequestOptions
User Registration Status
client.userRegistrationStatus.getUserRegistrationStatus({ ...params }) -> HubUser.RegistrationResponse
Description
Returns the registration status of a user identified by their email address. Used by the registration flow to determine whether a user exists and, if so, which step the user still has to complete (e.g. verifying their email address or waiting for administrative approval). Possible status values are
PENDING,APPROVED,REJECTED,NOT_FOUND, andEMAIL_NOT_VERIFIED.
Usage
- typescript
await client.userRegistrationStatus.getUserRegistrationStatus({ email: "john.doe@example.com" });
Parameters
request:
HubUser.GetUserRegistrationStatusRequest
requestOptions:
UserRegistrationStatusClient.RequestOptions
Search
client.search.users({ ...params }) -> HubUser.UserSearchDto[]
Description
Searches for users whose profile matches the supplied query string. Matching is performed case-insensitively against first name, last name, username, and email using a substring match. The result list is capped at a sensible default size; the endpoint does not expose pagination parameters. Returns an empty list if nothing matches — it does not respond with
404.
Usage
- typescript
await client.search.users({ q: "john" });
Parameters
request:
HubUser.SearchUsersRequest
requestOptions:
SearchClient.RequestOptions

