> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parable.work/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuth 2.0

> Connect Parable to Gong using OAuth refresh tokens

export const platform_1 = "Gong"

export const limit_0 = "about 3 requests/second and 10,000 requests per day; Parable respects Retry-After"

export const platform_0 = "Gong"

export const role_0 = "Technical Administrator (to create OAuth applications and manage scopes)"

export const tokenName_0 = "Client Secret"

<Tabs>
  <Tab title="Setup">
    <Card title="What You'll Need" icon="key">
      | Credential        | What it is                                              |
      | ----------------- | ------------------------------------------------------- |
      | **Client ID**     | OAuth application client ID from Gong                   |
      | **Client Secret** | OAuth application client secret                         |
      | **Refresh Token** | Token from completing the Gong OAuth authorization flow |
    </Card>

    ## Overview

    Connect Parable to Gong using OAuth 2.0 refresh tokens. You create a Gong OAuth application, complete the authorization flow outside Parable, then paste the client credentials and refresh token into the connection form.

    <Info>
      You do not enter an API Base URL in the form. Parable derives your regional Gong API host from the token response when you click **Save & test connection**, then stores it on the connector automatically.
    </Info>

    <Warning>
      Parable validates credentials by exchanging the refresh token at Gong's token endpoint. That call consumes the refresh token you paste. After a successful test, Parable stores the updated tokens returned by Gong.
    </Warning>

    <CardGroup cols={2}>
      <Card title="Conversations & CRM" icon="phone">
        Call recordings, transcripts, CRM associations, meetings
      </Card>

      <Card title="People & workspace" icon="users">
        Users, workspaces, scorecards, trackers, audit logs
      </Card>
    </CardGroup>

    ## Prerequisites

    <Info>
      **Setup access in {platform_0}.** These steps require **{role_0}**, or a colleague with equivalent permissions who can create credentials for you.

      If that is not you, ask your {platform_0} administrator.
    </Info>

    * A Gong OAuth application with the API scopes you need enabled
    * A refresh token obtained after authorizing that application

    ## Setup Guide

    <Steps>
      <Step title="Create a Gong OAuth application">
        1. Sign in to Gong as a Technical Administrator.
        2. Open **Company Settings → Ecosystem → API**.
        3. Create an OAuth application and note the **Client ID** and **Client Secret**.

        <Warning>
          **Copy your {tokenName_0} now!**

          This is the only time it will be displayed. Store it in a secure password manager before closing this page.
        </Warning>
      </Step>

      <Step title="Enable required API scopes">
        Enable the same scopes on the OAuth application that you need Parable to collect. See the [Basic Auth setup guide](/connectors/gong/basic-auth/setup) reference tab for the full scope list.
      </Step>

      <Step title="Obtain a refresh token">
        1. Complete the Gong OAuth authorization flow using your OAuth application (outside Parable).
        2. Exchange the authorization code at `https://app.gong.io/oauth2/generate-customer-token` for access and refresh tokens.
        3. Copy the **refresh token** for the Parable form.

        <Info>
          Parable does not host an in-app OAuth wizard in v1. You paste credentials manually after completing authorization in Gong or your own tooling.
        </Info>
      </Step>

      <Step title="Enter values in the form">
        1. Enter **Client ID**, **Client Secret**, and **Refresh Token**.
        2. Click **Save & test connection**.
        3. After validation succeeds, Parable stores refreshed tokens and your regional API base URL securely.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Reference">
    ## Token Endpoint

    ```
    POST https://app.gong.io/oauth2/generate-customer-token
    ```

    Authentication uses `client_secret_basic` (HTTP Basic with client ID and secret).

    ## Scopes Quick Reference

    See the [Basic Auth setup guide](/connectors/gong/basic-auth/setup) reference tab for the full Gong scope table.

    <Check>
      **Success!** If you received a `200 OK` response with valid data, your credentials are configured correctly. You can now proceed to configure this connector in Parable.
    </Check>

    <Tip>
      **Rate Limits:** {platform_1} enforces rate limits of **{limit_0}**.

      Parable handles rate limiting automatically with exponential backoff, but initial syncs of large datasets may take longer due to these limits.
    </Tip>

    ## Troubleshooting

    | Error                              | Meaning                                     | Solution                                                                                         |
    | ---------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------ |
    | `401 Unauthorized`                 | Invalid client credentials or refresh token | Verify client ID, secret, and refresh token                                                      |
    | `403 Forbidden`                    | Missing OAuth scope                         | Enable the scope on the OAuth application                                                        |
    | Validation succeeds but sync fails | Regional base URL not saved                 | Re-run **Save & test connection** so Parable can persist the API host from Gong's token response |

    ## Additional Resources

    <CardGroup cols={2}>
      <Card title="Gong API docs" icon="book" href="https://app.gong.io/settings/api/documentation">
        Endpoint reference (requires login)
      </Card>

      <Card title="API access guide" icon="key" href="https://help.gong.io/docs/receive-access-to-the-api">
        Customer-facing setup guide
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
