# Enable Customer Experience Insights

Before using Customer Experience Insights (CX Insights) to analyze conversational data, you
must enable specific APIs.

In this quickstart, you will complete the following actions:

1. Enable the APIs:

   - **Cloud Speech-to-Text API**---to upload audio files.
   - **Cloud Storage API**---to ingest conversations into CX Insights.
   - **Contact Center AI Insights API**---to use CX Insights.
   - **Dialogflow API** ---to support [Dialogflow runtime integration](https://docs.cloud.google.com/gemini-enterprise-cx/insights/dialogflow-runtime-integration.md.txt) and [topic modeling](https://docs.cloud.google.com/gemini-enterprise-cx/insights/topic-modeling-overview.md.txt).
   - **Sensitive Data Protection (DLP) API** ---to perform [redaction on audio or transcript files](https://docs.cloud.google.com/gemini-enterprise-cx/insights/ingest-conversations-api.md.txt#redaction).
2. Send a request to the Contact Center AI Insights API and receive a response.

3. Optionally, use CX Insights with VPC Service Controls.

## Before you begin

Security constraints defined by your organization might prevent you from completing the
following steps. For troubleshooting information, see
[Develop applications in a constrained Google Cloud environment](https://docs.cloud.google.com/resource-manager/docs/organization-policy/develop-apps-constrained-environment).

<br />

## Send a request and receive a response

1. [Install and set up](https://docs.cloud.google.com/sdk/install) the Google Cloud CLI. You can set up the
   gcloud CLI in one of the following development environments:

   ### Cloud Shell

   To use an online terminal with the gcloud CLI already set up,
   activate Cloud Shell:

   At the bottom of this page, a Cloud Shell session starts and
   displays a command-line prompt. It can take a few seconds for the session to
   initialize.

   ### Local shell

   To use a local development environment, follow these steps:
   1. [Install the gcloud CLI.](https://docs.cloud.google.com/sdk/docs/install)
   2. [Initialize the gcloud CLI.](https://docs.cloud.google.com/sdk/docs/initialize.md.txt)


2.

   Create local authentication credentials for your user account:

   ```bash
   gcloud auth application-default login
   ```


   If an authentication error is returned, and you are using an external identity provider
   (IdP), confirm that you have
   [signed in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud.md.txt).
3. Verify your setup by running the following command, which lists all of your
   CX Insights conversations.

       curl -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" "https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/conversations"

   Replace the following:
   - `PROJECT_ID`: your Google Cloud project ID.
   - `LOCATION`: the [region](https://docs.cloud.google.com/gemini-enterprise-cx/insights/regionalization.md.txt) in which you are running this request.

   The command should return an empty dictionary: `{}`.

## Optional: Use CX Insights with VPC Service Controls

To use CX Insights with VPC Service Controls, add
CX Insights to your security perimeter. For more information, see
the [VPC Service Controls documentation](https://docs.cloud.google.com/vpc-service-controls/docs.md.txt).

## What's next

- [Analyze conversations using custom highlights](https://docs.cloud.google.com/gemini-enterprise-cx/insights/custom-highlights-ui.md.txt)
- [Use the console to import and analyze a conversation](https://docs.cloud.google.com/gemini-enterprise-cx/insights/create-analyze-conversation-ui.md.txt)
- [List conversations using the console](https://docs.cloud.google.com/gemini-enterprise-cx/insights/list-conversations-ui.md.txt)