> 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 # GetEmbeddedScript # Package: embeddedScripts # Namespace: EmbeddedScriptsService # Method link: https://dev.wix.com/docs/api-reference/app-management/embedded-scripts/get-embedded-script.md ## Permission Scopes: Manage Embedded Scripts: SCOPE.DC-APPS.MANAGE-EMBEDDED-SCRIPTS ## Introduction Retrieves information about your app's existing embedded script. If your app doesn't have an embedded script on the relevant site, a `404` error is returned. --- ## REST API ### Schema ``` Method: getEmbeddedScript Description: Retrieves information about your app's existing embedded script. If your app doesn't have an embedded script on the relevant site, a `404` error is returned. URL: https://www.wixapis.com/v1/scripts Method: GET Method parameters: query param name: componentId | type: componentId | description: Extension GUID of the embedded script to retrieve. You can find the extension GUID in the **Extensions** page in the [app dashboard](https://manage.wix.com/account/custom-apps). If you added the embedded script extension [using the Wix CLI](https://dev.wix.com/docs/wix-cli/guides/extensions/site-extensions/embedded-scripts/add-an-embedded-script-extension.md), you can also find it in the extension's [`embedded.extension.ts` file](https://dev.wix.com/docs/wix-cli/guides/extensions/site-extensions/embedded-scripts/embedded-script-extension-files-and-code.md#embeddedextensionts). Return type: GetEmbeddedScriptResponse - name: properties | type: ScriptProperties | description: Details of the retrieved embedded script. - name: parameters | type: object | description: Dynamic parameters available to the script when it runs on the site. Learn more about [using dynamic parameters](https://dev.wix.com/docs/wix-cli/guides/extensions/site-extensions/embedded-scripts/embedded-script-extension-files-and-code.md#using-dynamic-parameters-in-your-html-code). - name: disabled | type: boolean | description: Whether to disable the script. Default: `false`. ``` ### Examples ### GetEmbeddedScript ```curl ~~~cURL curl -X GET \ https://www.wixapis.com/apps/v1/scripts \ -H 'Authorization: ' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.embeddedScripts.EmbeddedScriptsService.getEmbeddedScript(options) Description: Retrieves information about your app's existing embedded script. If your app doesn't have an embedded script on the relevant site, a `404` error is returned. Method parameters: param name: options | type: GetEmbeddedScriptOptions none - name: componentId | type: string | description: Extension GUID of the embedded script to retrieve. You can find the extension GUID in the **Extensions** page in the [app dashboard](https://manage.wix.com/account/custom-apps). If you added the embedded script extension [using the Wix CLI](https://dev.wix.com/docs/wix-cli/guides/extensions/site-extensions/embedded-scripts/add-an-embedded-script-extension.md), you can also find it in the extension's [`embedded.extension.ts` file](https://dev.wix.com/docs/wix-cli/guides/extensions/site-extensions/embedded-scripts/embedded-script-extension-files-and-code.md#embeddedextensionts). Return type: PROMISE - name: parameters | type: object | description: Dynamic parameters available to the script when it runs on the site. Learn more about [using dynamic parameters](https://dev.wix.com/docs/wix-cli/guides/extensions/site-extensions/embedded-scripts/embedded-script-extension-files-and-code.md#using-dynamic-parameters-in-your-html-code). - name: disabled | type: boolean | description: Whether to disable the script. Default: `false`. ``` ### Examples ### getEmbeddedScript ```javascript import { embeddedScripts } from '@wix/app-management'; async function getEmbeddedScript(options) { const response = await embeddedScripts.getEmbeddedScript(options); }; ``` ### getEmbeddedScript (with elevated permissions) ```javascript import { embeddedScripts } from '@wix/app-management'; import { auth } from '@wix/essentials'; async function myGetEmbeddedScriptMethod(options) { const elevatedGetEmbeddedScript = auth.elevate(embeddedScripts.getEmbeddedScript); const response = await elevatedGetEmbeddedScript(options); } ``` ### getEmbeddedScript (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 { embeddedScripts } from '@wix/app-management'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { embeddedScripts }, // Include the auth strategy and host as relevant }); async function getEmbeddedScript(options) { const response = await myWixClient.embeddedScripts.getEmbeddedScript(options); }; ``` ---