Picadabra Docs

User

User authentication and profile endpoints.

client.user.me()

Get the current authenticated user's profile.

const  = await ..();
FieldTypeDescription
userIdstringUnique user identifier
emailstring?User's email address

client.user.status()

Check if the current session is authenticated.

const  = await ..();

if (.) {
  // Show user dashboard
}
FieldTypeDescription
authenticatedtrueAlways true if request succeeds
userIdstringAuthenticated user's ID

Authentication Errors

Both endpoints require authentication. Without valid credentials, requests throw UNAUTHORIZED.

try {
  const user = await client.user.me();
} catch (error) {
  // Redirect to login
}

How is this guide?