- Inside Base44 apps: The client is automatically created and configured for you.
- External apps: Create the client yourself to use Base44 as a backend for your own app.
Inside Base44 apps
When Base44 generates your app, the SDK client is pre-configured and ready to use.Frontend client
In your frontend code, the client is already imported and available asbase44.
Backend functions
In Base44-hosted backend functions, create the client from the incoming request. Base44 injects the necessary authentication headers automatically.External apps
When building your own app that uses Base44 as a backend, create and configure the client yourself usingcreateClient().
Installation
Install the SDK via npm:Create the client
Create a client by providing your app ID, which you can find in the Base44 editor URL:User authentication
Authenticate users with email and password or through social providers. The client automatically applies the token to subsequent requests. Social authentication is available for Google, Microsoft, Facebook, and Apple usingloginWithProvider().
Service role
By default, the client operates with user-level permissions, limiting access to what the current user can see and do. The service role provides elevated permissions for backend operations and is only available in Base44-hosted backend functions.Service role authentication is only available in Base44-hosted backend
functions. External backends can’t use service role permissions.
- Access data and operations with the same permissions as your app’s admin.
- Use admin modules like the
connectorsmodule.
base44.asServiceRole instead of directly on the client. For example, base44.asServiceRole.entities.Task.list() operates with admin permissions, while base44.entities.Task.list() uses the current user’s permissions.
When using createClientFromRequest() in a backend function, the service role is automatically available:
See more
createClient()
Complete API reference
createClientFromRequest()
Backend client creation

