> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # IsPermittedToInstallApps # Package: appInstallation # Namespace: AppsInstallerService # Method link: https://dev.wix.com/docs/api-reference/business-management/app-installation/app-installation/is-permitted-to-install-apps.md ## Permission Scopes: Manage Events: SCOPE.EVENTS.MANAGE-EVENTS ## Introduction
__Note:__ Only logged-in [Wix users](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#wix-user) or [API key admins](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#api-key-admin) can use this API.
Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL. --- ## REST API ### Schema ``` Method: isPermittedToInstallApps Description:
__Note:__ Only logged-in [Wix users](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#wix-user) or [API key admins](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#api-key-admin) can use this API.
Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL. URL: https://www.wixapis.com/v1/app-instance/is-permitted-to-install Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: installType Method parameters: param name: installType | type: InstallType | required: true - enum: APPS_INSTALL - Installation based on app instance data provided in the request. SHARE_URL_INSTALL - Installation based on a shareable app URL. - ONE-OF: - name: appsInstallOptions | type: AppsInstallOptions | description: Install the app using app instance details. - name: tenant | type: Tenant | description: Tenant details. - name: id | type: string | description: Tenant GUID. For a site, this is the [site GUID](https://dev.wix.com/docs/rest/account-level/sites/sites/introduction.md). For an account this is the [account GUID](https://dev.wix.com/docs/rest/account-level/user-management/accounts/accounts/about-accounts.md). - name: tenantType | type: TenantType | description: Tenant type. This can be a Wix site or account. - enum: SITE, ACCOUNT - name: appInstances | type: array | description: Details of the app instances to create when the apps are installed. - name: appDefId | type: string | description: GUID of the app to install. - name: version | type: string | description: Version of the app to install. If you don't specify a version, the latest version of the app will be installed. Don't specify a version unless you want to install an older version of the app. - name: enabled | type: boolean | description: Whether the app instance is enabled. - name: shareUrlInstallOptions | type: ShareUrlInstallOptions | description: Install an app using a share URL. - name: shareUrlId | type: string | description: GUID of the share URL to install the app from. Return type: IsPermittedToInstallAppsResponse - name: permitted | type: boolean | description: Whether the installation is permitted. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_TENANT_TYPE | Description: Tenant type isn't supported for this operation. ``` ### Examples ### IsPermittedToInstallApps ```curl ~~~cURL curl --request POST \ https://www.wixapis.com/apps-installer-service/v1/app-instance/is-permitted-to-install \ -H 'Content-Type: application/json' \ -H 'Authorization: ' -d '{ "installType": "APPS_INSTALL", "appsInstallOptions": { "tenant": { "tenantType": "SITE", "id": "573cf0bc-a4d0-434c-ab5f-c8babcfa4a5b" }, "appInstances": [ { "appDefId": "96186799-d99a-4b96-adf9-7cb2c1cf1e79", "version": "1", "enabled": true } ] } }' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.appInstallation.AppsInstallerService.isPermittedToInstallApps(installType, options) Description:
__Note:__ Only logged-in [Wix users](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#wix-user) or [API key admins](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#api-key-admin) can use this API.
Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: installType, options.appsInstallOptions.tenant, options.appsInstallOptions.tenant._id, options.shareUrlInstallOptions.shareUrlId Method parameters: param name: installType | type: InstallType | required: true - enum: APPS_INSTALL - Installation based on app instance data provided in the request. SHARE_URL_INSTALL - Installation based on a shareable app URL. param name: options | type: IsPermittedToInstallAppsOptions none | required: true - ONE-OF: - required: true - name: appsInstallOptions | type: AppsInstallOptions | description: Install the app using app instance details. - name: tenant | type: Tenant | description: Tenant details. - name: _id | type: string | description: Tenant GUID. For a site, this is the [site GUID](https://dev.wix.com/docs/rest/account-level/sites/sites/introduction.md). For an account this is the [account GUID](https://dev.wix.com/docs/rest/account-level/user-management/accounts/accounts/about-accounts.md). - name: tenantType | type: TenantType | description: Tenant type. This can be a Wix site or account. - enum: SITE, ACCOUNT - name: appInstances | type: array | description: Details of the app instances to create when the apps are installed. - name: appDefId | type: string | description: GUID of the app to install. - name: version | type: string | description: Version of the app to install. If you don't specify a version, the latest version of the app will be installed. Don't specify a version unless you want to install an older version of the app. - name: enabled | type: boolean | description: Whether the app instance is enabled. - name: shareUrlInstallOptions | type: ShareUrlInstallOptions | description: Install an app using a share URL. - name: shareUrlId | type: string | description: GUID of the share URL to install the app from. Return type: PROMISE - name: permitted | type: boolean | description: Whether the installation is permitted. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_TENANT_TYPE | Description: Tenant type isn't supported for this operation. ``` ### Examples ### isPermittedToInstallApps ```javascript import { appsInstaller } from '@wix/apps-installer'; async function isPermittedToInstallApps(installType,options) { const response = await appsInstaller.isPermittedToInstallApps(installType,options); }; ``` ### isPermittedToInstallApps (with elevated permissions) ```javascript import { appsInstaller } from '@wix/apps-installer'; import { auth } from '@wix/essentials'; async function myIsPermittedToInstallAppsMethod(installType,options) { const elevatedIsPermittedToInstallApps = auth.elevate(appsInstaller.isPermittedToInstallApps); const response = await elevatedIsPermittedToInstallApps(installType,options); } ``` ### isPermittedToInstallApps (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { appsInstaller } from '@wix/apps-installer'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { appsInstaller }, // Include the auth strategy and host as relevant }); async function isPermittedToInstallApps(installType,options) { const response = await myWixClient.appsInstaller.isPermittedToInstallApps(installType,options); }; ``` ---