- Source:
- WixConnect.js
Members
-
<static> WIX_API_ENTRY_POINT
-
The URL for the Wix RESTful API
- Source:
- WixConnect.js
Methods
-
<static> parseInstance(instance, secret, validator) → {module:Wix/Connect.WixInstanceData}
-
Parses a Wix instance and verifies the data. Either returns an object or throws an exception
Parameters:
Name Type Argument Description instancestring the instance parameter sent by Wix
secretstring your application's secret key
validatormodule:Wix/Connect~WixDateValidator <nullable>
an optional data validator
- Source:
- WixConnect.js
Throws:
an exception if signatures don't matchReturns:
- a JSON object containing information from Wix about the requester
Type Definitions
-
WixInstanceData
-
Information about the requesting site
Type:
- Object
- Source:
- WixConnect.js
Properties:
Name Type Argument Description instanceIdstring The instanceId
signDateDate the date this request was signed
uidstring <nullable>
The ID of the site-member that is currently logged in (optional)
permissionsstring The permission set of the site member. At this point, the permissions have the value OWNER if the uid is of the site owner. Otherwise, the permissions member will be empty.
vendorProductIdstring Premium Package ID, as was entered in the Dev Center during the app registration process
-
WixDateValidator(date)
-
A callback that validates that a date sent from Wix is within a certain range. Defaults to 30 seconds
Parameters:
Name Type Description dateDate the Date from the signed Wix request
- Source:
- WixConnect.js