Skip to content

js-bao-wss-client


js-bao-wss-client / UsersAPI

Interface: UsersAPI ​

Sub-API for looking up other users in the app (client.users.*): fetch a single user's basic profile (cache-aware), batch-fetch profiles by id, or look up a user by email.

Methods ​

getBasic() ​

getBasic(userId, options?): Promise<BasicUserInfo>

Retrieves basic profile information for a user by their ID.

Parameters ​

userId ​

string

The unique identifier of the user to look up

options? ​

GetUserOptions

Controls caching and loading behavior

Returns ​

Promise<BasicUserInfo>


getProfiles() ​

getProfiles(userIds): Promise<BatchUserProfile[]>

Retrieves profiles for multiple users in a single batch request.

Parameters ​

userIds ​

string[]

Array of user IDs to look up (max 100)

Returns ​

Promise<BatchUserProfile[]>

Array of user profiles (only users that exist and belong to the app)


lookup() ​

lookup(email): Promise<{ exists: boolean; user?: { email: string; name: string; userId: string; }; }>

Look up a user by email in the current app.

Parameters ​

email ​

string

Email address to look up

Returns ​

Promise<{ exists: boolean; user?: { email: string; name: string; userId: string; }; }>

Object with exists boolean and optional user info

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30