Do not publish: This module is only available for app made by Wix and isn't supported for self-managed apps. It's intended for internal Wix platform usage.

Legacy API

The Legacy API provides methods that you can call to retrieve administrative context information for the current session.

The Legacy API includes the following methods:

  • getContextIds(): Retrieves context identifiers for the current administrative session, including account ID, user ID, site ID, and app ID. This method provides access to important contextual information that can be used to identify the current session's administrative context within the Wix platform.

Setup

@wix/admin

To use the Legacy API, install the @wix/admin package.

Install the package

Follow the installation instructions for your development environment.

Development environmentInstallation method
Blocks appsUse the package manager.
CLI and self-managed appsRun npm install @wix/admin or yarn add @wix/admin.

Usage

To use the Legacy API, you need to:

  1. Declare a global type to enable alpha features:
Copy
  1. Import the legacy module in your code:
Copy
  1. Call the module's methods directly. For example:
Copy

Note: This API requires the admin host to be available and properly initialized. Make sure to use an updated version of the host initialization package.

Did this help?