Skip to main content
This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the developer documentation.

App Module

Read an app’s own public configuration — currently just its visibility.
  • base44.app — Available in any authentication mode (anonymous, user, or service role). The client sends its token, if it has one, with the request.

Contents


Methods

getPublicSettings()

Retrieves the app’s public settings. Use it to determine whether the current visitor can access the app, and to decide whether to redirect them to the login page. Returns: Promise<AppPublicSettingsResponse> — { id, public_settings }, where public_settings is the app’s visibility (see Type Definitions). Throws: rejects with a Base44Error with status: 403 when the visitor can’t access the app. Check error.data.extra_data.reason:
  • auth_required — the visitor must sign in.
  • user_not_registered — the visitor is signed in but doesn’t have access.
Example:

Notes

  • Frontend and backend: app works in any authentication mode — anonymous, user, or service role (base44.app is the same in all of them; there’s no separate asServiceRole.app).
  • If the app requires login, use redirectToLogin() from the auth module to send the visitor to the login page.

Type Definitions