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.
Typically, you don’t need to call this function because Base44 creates the client for you. You can then import and use the client to make API calls. The client takes care of managing authentication for you.
The client supports three authentication modes:
- Anonymous: Access modules anonymously 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. - Service role authentication: Access modules with elevated permissions using
base44.asServiceRole.moduleName. Operations can access data across all users. Can only be used in the backend. Typically, you create a client with service role authentication using thecreateClientFromRequest()function in your backend functions.
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.
Service role authentication token. Use this in the backend when you need elevated permissions to access data across all users or perform admin operations. This token should be kept secret and never exposed in the app’s frontend. Typically, you get this token from a request to a backend function using createClientFromRequest().
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
Entities module for CRUD operations on your data models.
Integrations module for calling pre-built integration endpoints.
Auth module for user authentication and management.
Functions module for invoking custom backend functions.
Agents module for managing AI agent conversations.
App logs module for tracking app usage.
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 data and operations across all users.
Properties
Properties
Entities module with elevated permissions.
Integrations module with elevated permissions.
Connectors module for OAuth token retrieval.
Functions module with elevated permissions.
Agents module with elevated permissions.
App logs module with elevated permissions.
Cleanup function to disconnect WebSocket connections.

