Setup
To use the EmbeddedScripts API, install the @wix/app-market
package using npm or Yarn:
Copy
1npm install @wix/app-market
or
Copy
1yarn add @wix/app-market
Then import { embeddedScripts }
from @wix/app-market
:
Copy
1import { embeddedScripts } from '@wix/app-market'
Was this helpful?
Yes
No
embedScript( )
Developer Preview
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Inserts custom script tags into a site.
Your app must have an existing embedded script component, with exactly matching parameter names.
Permission Scopes
For app development, you must have one of the following permission scopes:Learn more about permission scopes.
Copy
function embedScript(properties: ScriptProperties): Promise<EmbedScriptResponse>
Method Parameters
propertiesScriptPropertiesRequired
Details of the script to embed.
Returns
Return Type:Promise<EmbedScriptResponse>
Was this helpful?
Yes
No
getEmbeddedScript( )
Developer Preview
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves information about your app's existing embedded script.
The call fails with 404
error in case your app doesn't include an
embedded script on the site.
Permission Scopes
For app development, you must have one of the following permission scopes:Learn more about permission scopes.
Copy
function getEmbeddedScript(): Promise<ScriptProperties>
Request
This method does not take any parameters
Returns
Return Type:Promise<ScriptProperties>
Was this helpful?
Yes
No