Essentials

The Essentials API contains common functionality that you might need when building on the Wix platform.

The Essentials API includes the following submodules:

  • auth: Allows you to work with Wix authentication and permissions.
  • httpClient: Includes helper methods for making authenticated requests within the Wix platform.
  • i18n: Allows app extensions to access the language and locale settings of the site on which it's installed.

Setup

@wix/essentials

To use the Essentials API, install the @wix/essentials package.

Install the package

Follow the installation instructions for your development environment.

Development environmentInstallation method
Wix sites (editor or IDE)Use the package manager.
Wix sites (local IDE)Run wix install @wix/essentials using the Wix CLI.
Blocks appsUse the same installation method as Wix sites.
CLI and self-hosted appsRun npm install @wix/essentials or yarn add @wix/essentials.
Headless sites and appsRun npm install @wix/essentials or yarn add @wix/essentials.

Import the package

To import the package in your code:

Copy
Did this help?