> 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 # DeleteAppPermission # Package: appPermissions # Namespace: AppPermissionsService # Method link: https://dev.wix.com/docs/api-reference/app-management/app-permissions/delete-app-permission.md ## Permission Scopes: Write Dev Center App Permissions: SCOPE.DEV_CENTER.WRITE_PERMISSIONS ## Introduction Deletes a permission from the specified app. After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission. > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys.md). --- ## REST API ### Schema ``` Method: deleteAppPermission Description: Deletes a permission from the specified app. After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission. > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys.md). URL: https://www.wixapis.com/apps/v1/app-permissions Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: appId, permissionId Method parameters: query param name: appId | type: appId | description: App GUID. You can find the app GUID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard. | required: true query param name: permissionId | type: permissionId | description: Permission GUID. To find the permission GUID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app.md#step-1--identify-required-permissions). | required: true Return type: DeleteAppPermissionResponse EMPTY-OBJECT {} ``` ### Examples ### Add a permission to an app ```curl curl -X DELETE \ 'https://www.wixapis.com/apps/v1/app-permissions/v1/app-permissions?appId=73k98f4e-a8f3-4b7c-9d87-23fc55g793ec&permissionId=SCOPE.DC-EVENTS.MANAGE-EVENTS' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -H 'wix-account-id: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.appPermissions.AppPermissionsService.deleteAppPermission(appId, permissionId) Description: Deletes a permission from the specified app. After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission. > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: appId, permissionId Method parameters: param name: appId | type: string | description: App GUID. You can find the app GUID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard. | required: true param name: permissionId | type: string | description: Permission GUID. To find the permission GUID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app.md#step-1--identify-required-permissions). | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteAppPermission ```javascript import { appPermissions } from '@wix/app-management'; async function deleteAppPermission(appId,permissionId) { const response = await appPermissions.deleteAppPermission(appId,permissionId); }; ``` ### deleteAppPermission (with elevated permissions) ```javascript import { appPermissions } from '@wix/app-management'; import { auth } from '@wix/essentials'; async function myDeleteAppPermissionMethod(appId,permissionId) { const elevatedDeleteAppPermission = auth.elevate(appPermissions.deleteAppPermission); const response = await elevatedDeleteAppPermission(appId,permissionId); } ``` ### deleteAppPermission (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 { appPermissions } from '@wix/app-management'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { appPermissions }, // Include the auth strategy and host as relevant }); async function deleteAppPermission(appId,permissionId) { const response = await myWixClient.appPermissions.deleteAppPermission(appId,permissionId); }; ``` ---