Authentication
Get current user
Returns the currently authenticated user.
Response:
{
"id" : "uuid" ,
"username" : "alice" ,
"displayName" : "Alice" ,
"avatarUrl" : "https://..." ,
"isBot" : false
}
TypeScript Python
const me = await client . getMe ( )
Update profile
Field Type Description displayNamestring Display name avatarUrlstring | null Avatar URL
TypeScript Python
const updated = await client . updateProfile ( {
displayName : 'New Name' ,
avatarUrl : 'https://example.com/avatar.png' ,
} ) updated = client . update_profile (
display_name = "New Name" ,
avatar_url = "https://example.com/avatar.png" ,
)
Get user profile
Returns a public user profile by ID.
TypeScript Python
const profile = await client . getUserProfile ( 'user-id' ) profile = client . get_user_profile ( "user-id" )
Register
No authentication required.
Field Type Required Description emailstring Yes Email address passwordstring Yes Password usernamestring No Unique username. Generated when omitted. displayNamestring No Display name inviteCodestring No Optional membership invite. Unlocks Cloud and server creation.
TypeScript Python
const { accessToken , refreshToken , user } = await client . register ( {
email : '[email protected] ' ,
password : 'secure-password' ,
displayName : 'Alice' ,
} ) result = client . register (
email = "[email protected] " ,
password = "secure-password" ,
display_name = "Alice" ,
)
access_token = result [ "accessToken" ]
Email code login
POST /api/auth/email/start
POST /api/auth/email/verify
Email code verification signs in an existing user or creates a visitor account.
await client . startEmailLogin ( { email : '[email protected] ' } )
const { accessToken , refreshToken , user } = await client . verifyEmailLogin ( {
email : '[email protected] ' ,
code : '123456' ,
} )
Login
No authentication required.
Field Type Required emailstring Yes passwordstring Yes
TypeScript Python
const { accessToken , refreshToken , user } = await client . login ( {
email : '[email protected] ' ,
password : 'secret' ,
} )
Refresh token
Returns a new JWT token.
TypeScript Python
const tokens = await client . refreshToken ( refreshToken ) result = client . refresh_token ( refresh_token )
Membership
Invite codes are not required to register. Use membership APIs to unlock advanced capabilities:
GET /api/membership/me
POST /api/membership/redeem-invite
Membership responses include status, tier, level, isMember, and effective
capabilities. Treat capabilities as the source of truth for advanced actions; new tiers can be
added later without changing this response shape.
Common advanced capabilities include cloud:deploy, server:create, invite:create, and
oauth_app:create. A missing capability should be rendered as an upgrade or invite redemption path,
not as a failed login.
Fast auth endpoints are rate limited. A 429 response includes RATE_LIMITED and Retry-After.
Disconnect
POST /api/auth/disconnect
Notifies the server that the client is disconnecting (used for presence tracking).
TypeScript Python
await client . disconnect ( )
List linked OAuth accounts
GET /api/auth/oauth/accounts
TypeScript Python
const accounts = await client . listOAuthAccounts ( ) accounts = client . list_oauth_accounts ( )
Unlink OAuth account
DELETE /api/auth/oauth/accounts/:accountId
TypeScript Python
await client . unlinkOAuthAccount ( 'account-id' ) client . unlink_oauth_account ( "account-id" )
Change password
Field Type Required Description currentPasswordstring Yes Current password newPasswordstring Yes New password
TypeScript Python
await client . changePassword ( {
currentPassword : 'old-pass' ,
newPassword : 'new-pass' ,
} ) client . change_password (
current_password = "old-pass" ,
new_password = "new-pass" ,
)
Google ID token login
POST /api/auth/google/id-token
Sign in or register using a Google ID token.
Field Type Required Description idTokenstring Yes Google ID token
TypeScript Python
const { accessToken , refreshToken , user } = await client . loginWithGoogleIdToken ( 'google-id-token' ) result = client . login_with_google_id_token ( "google-id-token" )
Dashboard
Returns the current user's dashboard summary.
TypeScript Python
const dashboard = await client . getDashboard ( ) dashboard = client . get_dashboard ( )