Identities are essential to managing interactions within the Wix ecosystem. Every request made to a Wix API is associated with an identity type, and the ability for an entity to use an API depends on their identity type. For example, site visitors can't create new products for the site, and apps can't add items to a visitor's cart unless authenticated on their behalf.
The following are recognized identity types:
Note: Wix apps can authenticate on behalf of other identity types. For more information, see About Authentication for Wix Apps.
Site visitors that access the live site for the first time or aren't logged in as members are also known as anonymous visitors. Wix assigns anonymous visitors a visitor ID and saves this ID in browser cookies.
Warning: If a site visitor cleans their cookies, they’re assigned a new visitor ID, and Wix can’t associate them with their previous visits.
When a site visitor creates an account on the site, and logs in, they become a site member. Wix assigns a member ID to each member and stores this information in a persistent manner. Site owners can use member roles to control permissions. To get member data, use Query Members and List Members.
Important: When Wix apps authenticate on behalf of Wix members, member roles can affect the permissions your app is granted. This behavior is currently only supported for Wix Blocks. For more information, see About Authentication for Wix Apps.
When a site visitor first shares their contact information with a site, which commonly happens on member sign up, a contact entry is created. Therefore, members are often linked to a contact. However, contacts aren't identities, and site visitors and members aren't recognized by their contact ID during site interactions. Contact IDs are primarily used for tasks like sending emails, unrelated to the visitor identity within the site. To get contact data, use Query Contacts or List Contacts.
Note: Any correlation between member ID and contact ID is coincidental.
A Wix user is someone who is logged into their account on *.wix.com. Users can be site owners or site collaborators, including app owners and collaborators who create test sites. Users who create a site are automatically designated as the owner of that site.
When a user registers, Wix assigns them a unique user ID and an account ID. All sites that a user creates are automatically assigned to their account, as well as any domains, teams, custom templates and custom apps. Users can log in to multiple accounts using their unique login credentials.
Site owners can invite collaborators and assign them specific user roles to control permissions. Site collaborators are authenticated at the site-level and don't have access to account-level data. However, account-level access can be shared and managed via teams, which offer default team roles and permissions. Accounts are particularly useful for businesses with multiple staff members who need access to manage sites or apps.
Important: When Wix apps authenticate on behalf of Wix users, user roles can affect the permissions your app is granted. For more information, see About Authentication for Wix Apps.
Wix apps are packages of reusable functionality that users can add to their sites. To learn about how apps fit into the Wix ecosystem, see How Apps Extend Wix.
Each Wix app has a unique app ID, which can be found on the OAuth page of your app's dashboard. When an app is installed on a Wix site, an app instance is generated with a distinct ID representing the app on that particular site.
Apps can authenticate as an app instance (specific to a site) or on behalf of other identity types, such as for apps featuring a dashboard page. For more information, see About Authentication for Wix Apps.
Upon successful authentication, an access token is returned specific to the requesting identity. If you try to access an API method with an unauthorized identity type, the request results in an unauthorized error response.
For example, site visitors and site members are restricted from using Create Product, and Wix users and apps are restricted from using Add to Current Cart.
In some app extensions, your app's Wix API calls have visitor, member, or Wix user authentication by default. In these cases, you can use the Javascript SDK to elevate specific calls to use Wix app authentication.
Learn more about elevated permissions.