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

# Connect Salesforce to Retell AI with OAuth 2.0

> Connect Salesforce to Retell AI using OAuth 2.0 Client Credentials — create a Connected App, get your Consumer Key and Secret, and start syncing contacts.

This guide walks you through creating a Salesforce Connected App and obtaining the credentials needed to connect Salesforce to Retell AI.

<Note>
  Retell uses the **OAuth 2.0 Client Credentials** flow for server-to-server authentication. This means no interactive login is required — Retell authenticates directly using the credentials you provide.
</Note>

## Prerequisites

* A Salesforce edition with API access (Enterprise, Unlimited, Developer, or Performance)
* System Administrator permissions in Salesforce
* A dedicated integration user account (recommended)

## Step 1: Create a Connected App

<Steps>
  <Step title="Open App Manager">
    Log in to Salesforce as an administrator. Click the **gear icon** in the top-right corner, then select **Setup**.

    In the Quick Find box, type **External Client App** and click on it.
  </Step>

  <Step title="Create a new External Client App">
    Click **New Connected App** in the top-right corner.

    Fill in the **Basic Information** section:

    * **App Name**: Enter a descriptive name (e.g., `Retell AI Integration`)
    * **API Name**: Auto-populated from the name
    * **Contact Email**: Your admin email address

    <Frame>
      <img src="https://mintcdn.com/retellai/M9dkUq1iShh05WLW/images/integration/salesforce-new-app.png?fit=max&auto=format&n=M9dkUq1iShh05WLW&q=85&s=6d5fe07b005ac7997198c05c0900891f" alt="New External Client App" width="3448" height="1840" data-path="images/integration/salesforce-new-app.png" />
    </Frame>
  </Step>
</Steps>

## Step 2: Enable OAuth Settings

<Steps>
  <Step title="Enable OAuth">
    Scroll down to the **API (Enable OAuth Settings)** section and check **Enable OAuth Settings**.
  </Step>

  <Step title="Set callback URL">
    Enter a placeholder **Callback URL** such as:

    ```
    https://api.retellai.com/oauth/callback
    ```

    The Client Credentials flow does not use a callback URL, but the field is required.
  </Step>

  <Step title="Enable Client Credentials Flow">
    Check **Enable Client Credentials Flow**. This is the critical setting that allows Retell to authenticate without interactive login.
  </Step>

  <Step title="Select OAuth scopes">
    Under **Selected OAuth Scopes**, add the following scopes from the Available list:

    * **Manage user data via APIs (api)** — required for REST API calls
    * **Perform requests at any time (refresh\_token, offline\_access)**

    Alternatively, select **Full access (full)** for complete API access.

    <Frame>
      <img src="https://mintcdn.com/retellai/M9dkUq1iShh05WLW/images/integration/salesforce-oauth.png?fit=max&auto=format&n=M9dkUq1iShh05WLW&q=85&s=50da9df582b0836f64790a548a5f3e87" alt="Config OAuth" width="3450" height="1832" data-path="images/integration/salesforce-oauth.png" />
    </Frame>
  </Step>

  <Step title="Save the Connected App">
    Click **Save**.

    <Warning>
      Salesforce may take up to 10 minutes to propagate changes after saving. Wait before attempting to use the credentials.
    </Warning>
  </Step>
</Steps>

## Step 3: Get Consumer Key and Consumer Secret

<Steps>
  <Step title="View consumer details">
    After saving, you'll be taken to the Connected App detail page. Click **Consumer Key and Secret**.

    You may be prompted to verify your identity via an email verification code.
  </Step>

  <Step title="Copy your credentials">
    Copy and securely store both values:

    * **Consumer Key** — this is your Client ID
    * **Consumer Secret** — this is your Client Secret

          <img src="https://mintcdn.com/retellai/M9dkUq1iShh05WLW/images/integration/salesforce-consumer-secret.png?fit=max&auto=format&n=M9dkUq1iShh05WLW&q=85&s=03c81415fefd89bee621b40747de7a10" alt="Consumer Key and Consumer Secret" width="3456" height="1824" data-path="images/integration/salesforce-consumer-secret.png" />

    <Warning>
      Treat the Consumer Secret like a password. Never share it in plaintext or commit it to source control.
    </Warning>
  </Step>
</Steps>

## Step 4: Configure App Policies

<Steps>
  <Step title="Open the Policies tab and edit">
    **OAuth Policies:**

    * Enable Client Credentials Flow.
  </Step>

  <Step title="Set the Run-As user">
    Under the **Client Credentials Flow** section, select a **Run As** user. This is the Salesforce user whose permissions the integration will use for all API calls.

    <Frame>
      <img src="https://mintcdn.com/retellai/M9dkUq1iShh05WLW/images/integration/salesforce-app-policy.png?fit=max&auto=format&n=M9dkUq1iShh05WLW&q=85&s=15e21ef64778a992e23837e071a4adcd" alt="OAuth Policies configuration" width="3448" height="1816" data-path="images/integration/salesforce-app-policy.png" />
    </Frame>
  </Step>

  <Step title="Save the policies">
    Click **Save**.
  </Step>
</Steps>

## Step 5: Connect Salesforce in Retell

<Steps>
  <Step title="Navigate to Integrations">
    In the Retell Dashboard, go to the **Integrations** section and select **Salesforce**.
  </Step>

  <Step title="Enter your credentials">
    Enter the Client ID (**Consumer Key**) and Client Secret (**Consumer Secret**) from Step 3.

    Provide your **Salesforce domain URL** (e.g., `https://your-org.my.salesforce.com`).

    <Frame>
      <img src="https://mintcdn.com/retellai/M9dkUq1iShh05WLW/images/integration/config-salesforce-integration.png?fit=max&auto=format&n=M9dkUq1iShh05WLW&q=85&s=f05ffba7a4df3c662e592c9bcade3890" alt="Entering Salesforce credentials in Retell" width="1206" height="952" data-path="images/integration/config-salesforce-integration.png" />
    </Frame>
  </Step>
</Steps>
