createClient(Creates a Base44 client. This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK’s modules, such asconfig):Base44Client
entities, auth, and functions.
How you get a client depends on your context:
- Inside a Base44 app: The client is automatically created and configured for you. Import it from
@/api/base44Client. - External app using Base44 as a backend: Call
createClient()directly in your code to create and configure the client.
- Anonymous: Access modules without authentication using
base44.moduleName. Operations are scoped to public data and permissions. - User authentication: Access modules with user-level permissions using
base44.moduleName. Operations are scoped to the authenticated user’s data and permissions. Usebase44.auth.loginViaEmailPassword()or other auth methods to get a token. - Service role authentication: Access modules with elevated permissions using
base44.asServiceRole.moduleName. Operations can access any data available to the app’s admin. Only available in Base44-hosted backend functions. Create a client with service role authentication usingcreateClientFromRequest().
entities module:
- Anonymous: Can only read public data.
- User authentication: Can access the current user’s data.
- Service role authentication: Can access all data that admins can access.
Parameters
Configuration object for the client.
Properties
Properties
The Base44 app ID.You can find the
appId in the browser URL when you’re in the app editor.
It’s the string between /apps/ and /editor/.User authentication token. Used to authenticate as a specific user.Inside Base44 apps, the token is managed automatically. For external apps, use auth methods like loginViaEmailPassword() which set the token automatically.
Returns
Base44Client
The Base44 client instance.
Provides access to all SDK modules for interacting with the app.
A configured Base44 client instance with access to all SDK modules.
Properties
Properties
Agents module for managing AI agent conversations.
Analytics module for tracking custom events in your app.
App logs module for tracking app usage.
Auth module for user authentication and management.
Entities module for CRUD operations on your data models.
Functions module for invoking custom backend functions.
Integrations module for calling pre-built integration endpoints.
Cleanup function to disconnect WebSocket connections. Call when you’re done with the client.
Provides access to supported modules with elevated permissions.Service role authentication provides elevated permissions for backend operations. Unlike user authentication, which is scoped to a specific user’s permissions, service role authentication has access to the data and operations available to the app’s admin.
Properties
Properties
Agents module with elevated permissions.
App logs module with elevated permissions.
Connectors module for OAuth token retrieval.
Entities module with elevated permissions.
Functions module with elevated permissions.
Integrations module with elevated permissions.
Cleanup function to disconnect WebSocket connections.

