App Instance

Overview

The Wix platform accesses each of the app endpoints using a URL with a set of query parameters that describes the endpoint context. The most important is the instance parameter.

The instance parameter enables you to identify the site and the Wix user, and to verify that the calling party is indeed Wix. The identity of the calling party is verified by a digital signature that is generated using the app secret key, which is generated during the app registration process in the Dev Center.

Structure

The instance parameter is composed of two parts that are separated by a dot:

  1. Signature: HMACSHA-256 signature. Generated using the app secret key and the data part of the instance. The signature is Base64 URL encoded.
  2. Data: A Base64 URL encoded JSON object. This JSON includes the instance properties, listed below. You’ll need to decode the data to see these properties.

Example of an instance query parameter:

Instance Properties

These properties make up the data part of the Instance parameter. They’re encoded with base64 URL, so you’ll need to decode it.

FieldDescription
JSON Example

Parsing Examples

Padding

The Base64 spec indicates that for URL-Safe Base64, the padding characters at the end of the encoded character (=) are optional. Wix encoding does not add the padding character.

In Ruby or Python, you should add the padding to the Base64 encoded values that you get from Wix.

Was this page helpful?

What can we do to improve it?

What did you like about it?