Authentication Context

Authentication context is information about who is calling an API.

Calling Velo APIs with authentication context allows you to use functions that return different responses based on the user who calls them, such as getCurrentMember().

The way that your SDK call receives authentication context depends on where your SDK call is being made:

  • Wix-hosted: In apps created in Wix native frameworks, such as the Wix CLI, the authentication context is given directly to the SDK.
  • Self-hosted: In self-hosted apps and Headless projects, you need to call the SDK using a Wix Client. This associates your SDK function calls with the site that hosts your HTTP functions and the authentication context of who is making the API call to send to your HTTP function.

    Note: Wix app is not a supported identity for calling this module with the Wix Client.

Did this help?