Module: Wix/Connect

Wix/Connect

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
instance string

the instance parameter sent by Wix

secret string

your application's secret key

validator module:Wix/Connect~WixDateValidator <nullable>

an optional data validator

Source:
  • WixConnect.js
Throws:
an exception if signatures don't match
Returns:
  • a JSON object containing information from Wix about the requester
Type
module:Wix/Connect.WixInstanceData

Type Definitions

WixInstanceData

Information about the requesting site

Type:
  • Object
Properties:
Name Type Argument Description
instanceId string

The instanceId

signDate Date

the date this request was signed

uid string <nullable>

The ID of the site-member that is currently logged in (optional)

permissions string

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.

vendorProductId string

Premium Package ID, as was entered in the Dev Center during the app registration process

Source:
  • WixConnect.js

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
date Date

the Date from the signed Wix request

Source:
  • WixConnect.js