HTTP functions allow you to expose the functionality of a Wix site as a service in the form of REST APIs. If you’ve added functionality to a site with code and want to use it in a Headless site or app, you can expose HTTP functions and call the APIs in your client code. Learn more about exposing a site API with HTTP Functions.
Use the http-function SDK to call your site's endpoints with authentication context.
Authentication context is information about who is calling an API.
If a Velo function doesn't receive authentication context, it treats the call as if it was made by an anonymous site visitor. This restricts the Velo functions you can use in your code without overriding authentication using elevate()
. Learn more about access type and permissions.
Providing your HTTP functions with authentication context allows you to:
getCurrentMember()
.The SDK client uses authorization strategies to authorize and authenticate SDK API calls. 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 access type is not supported.