The OAuth Apps API enables you to manage OAuth apps for a project or site. An OAuth app authorizes an external client app or site, on any platform, to authenticate with a Wix site or project and manage its data using the .
With the OAuth Apps API, you can:
To use Wix Headless functionality you need to create an OAuth app, either using the OAuth Apps API or in the project or site's . For instructions on how to do this, see how to for Wix Headless.
Once you have created an OAuth app, learn how to .
It's important to note the following points before starting to code:
This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.
You can create a frontend template, on an external platform, that takes advantage of business solutions on a Wix project.
For any external app or site to access a Wix project's data, it must be authorized in advance by creating an OAuth app. To enable project owners to connect a site or app built on your template to their existing Wix project data, follow these steps:
descriptionthat identify the client clearly. In the
allowedDomainsarray, provide the deployment domains from the previous step.
Whenever an external client redirects a user to Wix for authentication, the client provides a URL for Wix to redirect the user back to after authentication. To ensure security, Wix only redirects the user if the domain has been approved in advance in the OAuth app's settings. To update an external client's approved URLs, follow these steps:
oAuthApp.allowedDomainsbody parameter, and pass
To prevent a client site or app from accessing a Wix project's data, you can disable its permissions by deleting the OAuth app it connects through. To delete the OAuth app, follow these steps:
Creates a new OAuth app for a Wix Headless client.
Retrieves an OAuth app by ID.
Updates an OAuth app.
Only fields provided in
mask.paths are updated.
You can update the following fields:
Retrieves a list of OAuth apps, given the provided paging, filtering, and sorting.
Query OAuth Apps runs with these defaults, which you can override:
idin descending order.
For field support for filters and sorting, see
To learn about working with Query endpoints in general, see .
Triggered when an OAuth app is created.
Triggered when an OAuth app is updated.
Triggered when an OAuth app is deleted.