Closes the modal endpoint.
SDK Version: SDK 1.27.0+
Display: Dashboard, Modal
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
message | Object | A custom message to pass to the calling endpoint’s onClose callback function |
Example:
Retrieves a URL for the app in the Editor. If your app is installed on more than one page, the first page that contains your app will be opened. If the user didn’t install the Site component yet, this will return a URL to the Wix Editor that will open the App Market with your app in pending.
SDK Version: SDK 1.33.0+
Display: Dashboard
Syntax:
Note:
This is only relevant for apps that have both a site component and a dashboard component.
Parameters:
Name | Type | Description |
---|---|---|
callback (required) | Function | Callback function to receive the URL that directs users to the app in the Wix Editor |
Value passed to callback: The URL that directs users to the app in the Wix Editor. Note that:
Example:
Returns a json with pricing information for all of your app’s packages – premium plans and in-app purchase packages.
SDK Version: SDK 1.72.0+
Display: Dashboard
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
onSuccess (required) | Function | A callback function to receive the pricing information |
onError | Function | A callback function for when an error occurs |
Example:
Retrieves the live site’s base URL.
SDK Version: SDK 1.74.0+
Display: Dashboard
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
onSuccess (required) | Function | A callback function to receive the base url object |
Value passed to callback:
An object with the base URL of the live site.
For example: {base : “http://www.wix.com”}
Example:
Allows the app to open the Wix billing page.
SDK Version: SDK 1.27.0+
Display: Dashboard
Syntax:
Example:
This method opens the Wix Media Manager, which allows users to choose an existing item from the Wix media galleries or upload a new file.
SDK Version: SDK 1.27.0+
Display: Dashboard
Once the user selects a media item, a callback function returns a metadata descriptor with details about it.
To access the media item, use one of the Wix.Utils.Media.get* methods to construct the item’s full URL. You’ll need the item’s relativeUri, which is returned in the callback function.
Warning:
Use the Wix.Utils.Media.get* methods each time you access the media item, to prevent broken links.
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
mediaType (required) | Wix.Settings.MediaType.IMAGE,Wix.Settings.MediaType.BACKGROUND,Wix.Settings.MediaType.AUDIO,Wix.Settings.MediaType.SECURE_MUSIC, Wix.Settings.MediaType.DOCUMENT,Wix.Settings.MediaType.SWF | Type of media item the user is selecting: IMAGE (photo/image), BACKGROUND (background image), AUDIO (mp3 file up to 50MB), SECURE_MUSIC (high quality audio up to 360MB), DOCUMENT, SWF |
multiSelect (required) | Boolean | true if the user selected more than one item. false if the user selected only one item. |
onSuccess (required) | Function | Callback function to pass metadata about this media item |
onCancel | Function | Callback function called when the user cancels |
Value passed to onSuccess callback:
An object or an array of objects (for multiple media items).
Each object contains metadata about a specific media item.
Example:
Opens a lightbox-style modal window over your app in the Wix Dashboard. You can only open this modal from the Wix Dashboard.
SDK Version: SDK 1.27.0+
Display: Dashboard
Here’s how the modal works:
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
url (required) | String | URL of the modal iframe |
width (required) | Number | Width of the modal, in pixels (for example, 400) |
height (required) | Number | Height of the modal, in pixels (for example, 400) |
onClose | Function | OnClose callback function |
theme | Wix.Theme | The style of the modal: Wix.Theme.DEFAULT - has the regular modal look & feel - border, shadow, close button. Wix.Theme.BARE - a simple modal with no border, close button, shadow, etc. |
Example:
Enables AJAX style Page apps to inform the Wix platform about a change in the app internal state. The new state will be reflected in the site/page URL. Once you call the pushState method, the browser’s top window URL will change the ‘app-state’ path part to the new state you provide with the pushState method (similar to the browser history API). Read more about deep linking for a full explanation.
SDK Version: SDK 1.35.0+ Display: Dashboard
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
state (required) | String | The new app's state to push into the dashboard history stack |
Example:
Verifies that the session is secure. If the session is secure, this method returns a newly-signed app instance.
SDK Version: SDK 1.52.0+
Display: Dashboard
Use this method before displaying sensitive information or performing an action that requires a secure session.
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
onSuccess (required) | Function | Receives a newly-signed and encoded app instance |
onFailure | Function | Callback function in case the session isn't secure |
Example:
Opens a lightbox-style modal window over your app in the Wix Dashboard. You can only open this modal from the Wix Dashboard.
SDK Version: Deprecated
Display: Dashboard
Here’s how the modal works:
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
url (required) | String | URL of the modal iframe |
width (required) | Number | Width of the modal, in pixels (for example, 400) |
height (required) | Number | Height of the modal, in pixels (for example, 400) |
onClose | Function | OnClose callback function |
theme | Wix.Theme | The style of the modal: Wix.Theme.DEFAULT - has the regular modal look & feel - border, shadow, close button. Wix.Theme.BARE - a simple modal with no border, close button, shadow, etc. |
Example:
SDK Version: Deprecated
Requests the hosting Wix platform to change the iframe’s height inside the side dashboard
Parameters:
Name | Type | Description |
---|---|---|
height (required) | Number | The window's new height |
Example: