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.To use the Essentials API, install the @wix/essentials
package.
Follow the installation instructions for your development environment.
Development environment | Installation method |
---|---|
Wix sites (editor or IDE) | Use the package manager. |
Wix sites (local IDE) | Run wix install @wix/essentials using the Wix CLI. |
Blocks apps | Use the same installation method as Wix sites. |
CLI and self-hosted apps | Run npm install @wix/essentials or yarn add @wix/essentials . |
Headless sites and apps | Run npm install @wix/essentials or yarn add @wix/essentials . |
To import the package in your code: