Get started with site users
This quickstart creates a site user — someone who signs in to your app — not a cloud user or organization membership. Select the site first, then use the Console or an SDK.
Create a user in the Console
- Open the target site in TaruviBase Console.
- Open Users, select Add User, and fill in Create New User.
- Share the initial password with the user securely. Never put it in source control, a ticket, or a screenshot.
- Verify the new record appears in the site-user list.
Or create a user with JavaScript
import {Client} from '@taruvi/sdk';
import {User} from '@taruvi/sdk';
const taruvi = new Client({
apiUrl: process.env.TARUVI_SITE_URL!,
apiKey: 'session-authenticated-client',
appSlug: process.env.TARUVI_APP_SLUG!,
token: process.env.TARUVI_SESSION_TOKEN!,
});
const users = new User(taruvi);
const initialPassword = process.env.TARUVI_NEW_USER_PASSWORD;
if (!initialPassword) throw new Error("Set TARUVI_NEW_USER_PASSWORD");
const created = await users.createUser({
username: "onboarding-user",
password: initialPassword,
confirm_password: initialPassword,
first_name: "Onboarding",
last_name: "User",
});
const verified = await users.getUser("onboarding-user");
The script creates the user, then reads it back by username. If creation fails validation, fix the rejected value and try again. Continue with site users to list, update, and remove users. Organization members and their site access are managed only in Console.
Run this on a server, with TARUVI_SITE_URL, TARUVI_APP_SLUG,
TARUVI_SESSION_TOKEN, and TARUVI_NEW_USER_PASSWORD set. The client signs in
with the session token. The SDK requires an apiKey value but doesn't send it,
so a placeholder is fine. In a browser, use hosted sign-in instead, because the
browser client ignores token.
For failures not resolved by these checks, see troubleshooting.