This page describes how to set up and configure a Google Cloud project with
the necessary OAuth credentials before creating the Google Stitch data
store.

## Create OAuth app and client credentials

To set up OAuth credentials for Google Stitch, a Google Cloud administrator
must perform the following steps in the Google Cloud console.

### Enable the Google Stitch API

In the Google Cloud console, enable the Google Stitch API.

1. Go to the **API Library** page.

   [Go to API Library](https://console.cloud.google.com/apis/library)
2. In the search box, enter `Google Stitch API` or `Stitch API` and click the result.
3. Click **Enable**.

### Create an OAuth consent screen

If you don't have an OAuth consent screen configured for your project, follow
these steps:

1. Go to the **OAuth consent screen** page.

   [Go to OAuth consent screen](https://console.cloud.google.com/auth/overview)
2. Enter the required information, such as the **App name** , **User support
   email** , and **Developer contact information**.
3. Under **Scopes** , click **Add or remove scopes** and add the following scope:
   - `https://www.googleapis.com/auth/aida`
4. Under **Audience** , select the user type for your app:
   - **Internal**: If the app is restricted to members of your organization.
   - **External** : If you want to make it available to any Google user. If you select **External** , you must add test users under **Test users**.
5. Save your changes.

### Create OAuth client credentials

To create a new OAuth client ID and client secret:

1. Go to the **Credentials** page.

   [Go to Credentials](https://console.cloud.google.com/apis/credentials)
2. Click **Create Credentials** and select **OAuth client ID**.
3. For **Application type** , select **Web application**.
4. In the **Name** field, enter a name for the credentials.
5. In the **Authorized redirect URIs** section, click **Add URI** and enter the following URI: `https://vertexaisearch.cloud.google.com/oauth-redirect`
6. Click **Create**.
7. In the dialog that appears, copy the **Client ID** and **Client Secret**, and save them securely.