TypeScript SDK
client.users
Reference for the UsersResource — read and update the authenticated user's profile and change password, mirroring /api/v1/users/me.
client.users
client.users wraps /api/v1/users/me/* — the authenticated user's profile and password change. There are no methods that read or modify other users; user management is part of the Organizations API (members) rather than this resource.
Minimal surface — see the Users API reference for the full endpoint contract, including admin-only paths that the SDK does not yet expose.
HTTP-level failures surface as EBonApiError — see Errors and /en/api/errors.
client.users.get()
Get the authenticated user's profile.
async get(): Promise<UserProfile>
No parameters. Returns { uid, email, displayName, phoneNumber, createdAt, role }.
const me = await client.users.get();
client.users.update(body)
Update the authenticated user's profile.
async update(body: UpdateUserBody): Promise<UserProfile>
| Name | Type | Required | Notes |
|---|---|---|---|
displayName | string | no | New display name. |
phoneNumber | string | no | New phone number (E.164 recommended). |
Returns the updated UserProfile.
await client.users.update({ displayName: 'Ana Popescu' });
client.users.changePassword(body)
Change the authenticated user's password.
async changePassword(body: ChangePasswordBody): Promise<undefined>
| Name | Type | Required | Notes |
|---|---|---|---|
currentPassword | string | yes | The current password (re-auth challenge). |
newPassword | string | yes | The new password. |
Returns undefined on success.
await client.users.changePassword({
currentPassword: process.env.OLD_PW!,
newPassword: process.env.NEW_PW!,
});