# Integrate Cloud Voice with Google Workspace

Linking Cloud Voice to Google Workspace lets your organization use Google Single Sign-On (Google SSO) and pull user accounts directly from your Google directory. Completing the connection is a three-part process: you collect a pair of redirect URIs (Uniform Resource Identifiers, the web addresses Google returns a user to after sign-in) from Cloud Voice, build the matching project and credentials in Google Workspace, and then paste those credentials back into Cloud Voice to finish the handshake.

## Requirements

Before you begin, confirm both platforms meet the following:

| Platform | Requirement |
| --- | --- |
| Google Workspace | Business or Enterprise edition. |
| Cloud Voice | Firmware [84.19.0.22](/pbx/integrations/google-workspace/firmware-dependency-reference/) or later, on the Enterprise Plan or Ultimate Plan. |

## Step 1. Collect the redirect URIs from Cloud Voice

Google Workspace needs two redirect URIs from Cloud Voice before you can register the application, so gather them first.

1. Open the Google Workspace integration page:

   1. Sign in to the Cloud Voice web portal and go to **Integrations > Collaboration**.
   2. Find **Google SSO** in the list and click **Integrate** on its row.

   
   ![Cloud Voice, the Collaboration tab with the Integrate button for Google SSO](/images/pbx/google-sso-entrance.png)

2. In the **App Registration** section, copy and save both redirect URIs.

   
   ![Cloud Voice, the App Registration section listing the two redirect URIs to copy](/images/pbx/google-redirect-uri-cloud.png)

   - **Redirect URI**: Where the browser lands once integration authentication succeeds.
   - **Client SSO Redirect URI**: The address that lets users sign in to the Cloud Voice App with their Google credentials.

## Step 2. Build the project and credentials in Google Workspace

Sign in with a Google Workspace super admin account to create a dedicated Cloud project and enable the APIs (Application Programming Interfaces) the integration depends on.

:::caution
You must be signed in as a Google Workspace super admin for both this step and Step 3. A regular admin account cannot grant the organization-wide access to user data that the integration needs, so the authorization in Step 3 will fail.
:::

1. Create a Cloud project for your organization:

   1. Sign in to the [Google Cloud console](https://console.cloud.google.com/), search for **Create a Project**, and open the matching result.

      ![Google Cloud console search results showing the Create a Project entry](/images/pbx/google-create-project.png)

   2. Fill in the project details and click **Create**.

      
      ![Cloud Voice, the new project form with name, organization, and location fields](/images/pbx/google-setup-project.png)

      - **Project name**: A label that helps you recognize the project later.
      - **Organization**: The organization the project belongs to.
      - **Location**: The place within your organization's resource hierarchy where the project is created.

2. Turn on the Admin SDK API so the integration can reach user data across your organization:

   1. Search for **Admin SDK API** and open it from the results.

      ![Google Cloud console search results for the Admin SDK API](/images/pbx/google-search-api.png)

   2. Click **ENABLE**.

      ![The Admin SDK API page with the Enable button](/images/pbx/google-enable-api.png)

3. Set up the OAuth (Open Authorization) consent screen. Its branding details appear whenever someone authorizes the application you create in the next step:

   1. Search for **Branding** and open it from the results.

      ![Google Cloud console search results for Branding](/images/pbx/google-search-branding.png)

   2. Click **Get Started**.

      ![The Branding page with the Get Started button](/images/pbx/google-get-started.png)

   3. Work through the wizard to complete the consent screen settings.

      
      ![Cloud Voice, the OAuth consent screen configuration wizard](/images/pbx/google-oauth-consent.png)

4. Create a web application to generate the credentials that let Cloud Voice authenticate against your directory:

   1. Click **Create OAuth client**.

      ![The credentials page with the Create OAuth client option](/images/pbx/google-create-oauth-client.png)

   2. In the **Application type** drop-down, choose **Web application**.

      ![The Application type drop-down set to Web application](/images/pbx/google-app-type.png)

   3. In the **Name** field, enter a label for the application.

      ![The web application form with the Name field](/images/pbx/google-web-application.png)

   4. Under **Authorized redirect URIs**, add both redirect URIs you copied from Cloud Voice in Step 1.

      :::caution
      Enter each redirect URI exactly as it appears in Cloud Voice, including the `https://` prefix and any trailing path. Google matches the value character for character, so any difference makes sign-in fail with a "redirect URI mismatch" error.
      :::

      
      ![Cloud Voice, the Authorized redirect URIs section with the Cloud Voice URIs added](/images/pbx/google-add-redirect-uri-cloud.png)

   5. Click **Create**. Google displays the new credentials in a pop-up window.

   6. Copy and save the **client ID** and **client secret**: you enter both in Cloud Voice in the next step.

      :::caution
      Treat the client secret like a password. Anyone who obtains it can impersonate your integration and reach your organization's directory data, so store it somewhere secure and never share it.
      :::

      ![The pop-up window showing the generated client ID and client secret](/images/pbx/google-api-credential.png)

      :::note
      If the client secret isn't shown, click **Download JSON** to retrieve the credentials.

      ![The credentials view without a visible client secret and the Download JSON option](/images/pbx/google-no-client-secret.png)
      :::

## Step 3. Finish the connection in Cloud Voice

Return to Cloud Voice and enter the credentials to complete the integration.

1. Open the Google Workspace integration page again:

   1. Sign in to the Cloud Voice web portal and go to **Integrations > Collaboration**.
   2. Click **Integrate** on the **Google SSO** row.

2. In the **Certificates & Secrets** section, paste the client ID and client secret from Google Workspace.

   ![The Certificates and Secrets section with client ID and secret fields](/images/pbx/pbx-google-api-credential.png)

3. Click **Save**. Cloud Voice sends you to the Google sign-in page.

4. Sign in with your Google Workspace super admin account and authorize the web application to access your organization's user data.

   
   ![Cloud Voice, the Google authorization prompt for the web application](/images/pbx/google-integration-authentication.png)

5. Back in the Cloud Voice portal, click **OK** to close the dialog.

   ![The confirmation dialog reporting a successful integration](/images/pbx/google-integration-success.png)

## Result

The integration now shows a status of **Connected**, confirming that Cloud Voice is linked to your Google Workspace.

![Cloud Voice, the Google SSO integration showing a Connected status](/images/pbx/google-connected.png)

## What to do next

[Synchronize users from Google Workspace to Cloud Voice](/pbx/integrations/google-workspace/synchronize-users-from-google-workspace-to-cloud-voice/) so their Google accounts map to extensions they can use for calls.
