> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Connect a Frontend ## Article: Create an OAuth App ## Article Link: https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/connect-a-frontend.md ## Article Content: # Set Up a Headless Client for Your Project Wix Headless uses [OAuth 2.0 for authorization and authentication](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/about-authentication.md) of [visitors](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/about-authentication.md) and [members](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/about-authentication.md). The OAuth protocol allows visitors or members to grant an external app or site (a "client") access to their data on a Wix project or site, without them needing to provide the client with their login credentials for the Wix project itself. You can add an OAuth app to an existing site or a [self-managed headless project](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/create-a-project.md). The setup process is the same for both. You can either add an OAuth app programmatically by calling [Create OAuth App](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/create-oauth-app.md) or manually through the UI. This enables headless functionality by allowing external sites or apps to securely access your project data using Wix APIs. Create an OAuth app for each client that you want to interact with your project. For example, if you're creating a site and a mobile app, create 2 OAuth apps, one for the site and the other for the mobile app. To create an OAuth app through the UI: 1. In your project dashboard, go to **Settings** > **Development & integrations** > [**Headless Settings**](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Foauth-apps-settings). 2. In the **Headless clients** section, click **Create New Client** to create an OAuth app for your client. ![Click create new client](https://wixmp-833713b177cebf373f611808.wixmp.com/images/921e3baf09a218de0dbeb8f1b7178567.png) 3. Enter a name for the OAuth app in the **Client name** field. Choose a name that identifies the client clearly. For example, if the client is a fitness-related smartwatch app, you can name the OAuth app "Smartwatch Gym Client App". Once you enter a name, select the client type and click **Create & Continue**. ![Enter name and description](https://wixmp-833713b177cebf373f611808.wixmp.com/images/5bb7584905dbaa6d0972cc215afbfb31.png) 4. Select the stack you're using to call Wix APIs. ![Select your stack](https://wixmp-833713b177cebf373f611808.wixmp.com/images/91d5e279c4164a03dd3a8b8111fcd3b3.png) Once you select the stack, the modal expands to display code snippets for 5 apps built by Wix. Each code snippet is customized for the stack that you choose. You can copy these snippets to help you get started working with Wix APIs. ![Code snippets example](https://wixmp-833713b177cebf373f611808.wixmp.com/images/10a03aebad903eaa44234f772c5a2b3d.png) Once you choose your stack and copy any snippets you need, click **Continue**. 5. Click **View Your Setup** to close the modal and view your project's **Headless Settings**. Optionally, you can test out API calls using one of the 2 options displayed: - **Test API calls in the JavaScript playground:** Clicking **Open Playground** opens a new modal that lets you select different APIs and methods, and test out calls to them using the client ID you just created. - **See an example site in CodeSandbox**: Clicking **Go to Sandbox** opens a new tab with a CodeSandbox project. The project contains complete code that makes calls to various APIs like eCommerce and Bookings. You can copy code straight from the example, or fork the project to start editing and testing your own code. ![Choose a testing tool](https://wixmp-833713b177cebf373f611808.wixmp.com/images/9434269549aebd7477b700e230b098d2.png) 6. In the **Headless clients** section, your new OAuth app now appears with the client ID. Copy the **Client ID** and use it to connect and authenticate with your Wix project from a client. You can also retrieve the client ID later by returning to the [**Headless Settings**](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Foauth-apps-settings) page. 7. Many external client sites redirect visitors to Wix-managed pages for processes such as authentication and checkout. Wix then returns the visitor to the external site. To protect data security, Wix only ever redirects visitors to site addresses you approve in the **URLs** section. Therefore, if you want your external site to redirect to Wix-managed pages, you need to provide approval for the following URLs: - [**Allow Redirect Domains**](https://dev.wix.com/docs/go-headless/develop-your-project/business-flows/add-allowed-redirect-domains.md): Domains that Wix can redirect visitors to from Wix-managed pages. - [**Login URL**](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/members/custom-login-page/custom-login/set-a-login-url.md): URL of your custom login interface, if you will develop one. - [**Allow Authorization Redirect URIs**](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/members/add-allowed-authorization-redirect-uris.md): URIs that Wix can redirect members back to after they complete the authorization process. > **Note:** Return to [**Headless Settings**](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Foauth-apps-settings) to see a list of clients authorized for your project, to retrieve a client ID, or to edit settings.