About Identities

When a method is called on your site or on a custom dashboard page, it is called by a specific identity. This identity represents the current site user who triggers the method call, regardless of whether the code making the call is in the frontend, the backend, or on a custom dashboard page.

Some Velo methods are restricted based on which identities are authorized to call them. Authorization notes in the Velo API reference indicate when a method may be restricted by identity. If necessary, you can call such methods even when the current identity lacks permissions by using elevation.

Note: Some methods may further restrict access by requiring that the calling identity has specific permissions granted through a role. You can use elevation to bypass these restrictions as well.

The Velo API recognizes the following identities:

Site visitor

Site visitors are visitors to a site who have not logged in. Methods that site visitors can call typically involve operations specific to their own experience on the site, such as:

  • Adding products to the current cart.
  • Creating a booking.
  • Copying text to the local clipboard.

Site member

Site members are visitors who have logged in. They can call all the same methods available to site visitors, plus additional methods that only apply to their site membership.

Site members who are also site owners or collaborators are also considered admins. Their admin status allows them to call certain administrative methods that other members cannot call, such as methods to work with the files in the site’s Media Manager.

Wix user

When interacting with the site dashboard, site owners or collaborators take on the Wix user identity. Although Wix users are the same people as site owners and collaborators, they assume different identities depending on context.

As the dashboard is a secured admin area, Wix users can call methods with stricter authorization requirements in the dashboard. Examples of administrative methods Wix users can call in the dashboard include:

  • Adding products to a store.
  • Confirming or canceling bookings.
  • Approving new members.

Note: Although calls made from a published dashboard page are called with the authorization of a Wix user, those same calls made from a dashboard page being previewed in the editor are only called with the authorization of a site member admin. This means that calls which will work in your published dashboard page may not work when previewing the same dashboard page.

See more

Did this help?