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

# Salesforce (Client Credentials) - How do I link my account?

# Overview

To authenticate with Salesforce (Client Credentials), you will need:

1. **Client ID** – The Consumer Key from your Salesforce External Client App.
2. **Client Secret** – The Consumer Secret from your Salesforce External Client App.
3. **Hostname** – Your Salesforce instance hostname (e.g. `acme.my.salesforce.com`).

This guide walks you through obtaining these values.

### Prerequisites

* A Salesforce account with administrative privileges to create External Client Apps.

### Instructions

#### Step 1: Create an External Client App

1. Log in to Salesforce and go to **Setup**.
2. In the Quick Find box, enter **App Manager**, then select **App Manager**.
3. Click **New External Client App**.
4. Fill in the required basic information (Name, API Name, Contact Email).

<img src="https://mintcdn.com/nango/DcegLIzYgLEyo6lB/api-integrations/salesforce-jwt/app_basic_info.png?fit=max&auto=format&n=DcegLIzYgLEyo6lB&q=85&s=846828cd7219ff5498245c7e5810b414" width="1910" height="734" data-path="api-integrations/salesforce-jwt/app_basic_info.png" />

5. Check **Enable OAuth Settings**.
6. For **Callback URL**, you can enter `https://api.nango.dev/oauth/callback`.
7. Under **Selected OAuth Scopes**, add at least `Access and manage your data (api)`.

<img src="https://mintcdn.com/nango/DcegLIzYgLEyo6lB/api-integrations/salesforce-jwt/enable_oauth.png?fit=max&auto=format&n=DcegLIzYgLEyo6lB&q=85&s=7a23abe216cd59eb6716ff898d6fd358" width="1910" height="812" data-path="api-integrations/salesforce-jwt/enable_oauth.png" />

8. Enable the Client Credentials flow:
   * In **OAuth Settings**: Under **Flow Enablement**, check **Enable Client Credentials Flow**.

<img src="https://mintcdn.com/nango/U9nmnln3ztSo1ShU/api-integrations/salesforce-cc/enable_client_credentials.png?fit=max&auto=format&n=U9nmnln3ztSo1ShU&q=85&s=f46de12a6e1b9eb93b578d88267f7dd6" width="1918" height="841" data-path="api-integrations/salesforce-cc/enable_client_credentials.png" />

9. Click **Save**.

#### Step 2: Assign an Execution User

For External Client Apps using the Client Credentials flow, Salesforce requires you to specify an execution user:

1. In **App Manager**, locate your app, click the dropdown arrow next to it, and select **Edit Policies**.
2. Navigate to the **OAuth Policies** section.
3. Under **OAuth Flows and External Client App Enhancements**:
   * Enable **Client Credentials Flow**.
   * In the **Run As (Username)** field, enter the username of a Salesforce user who has the necessary permissions required by the app.
4. Click **App Policies**, select the profiles or permission sets that can use this app, then click **Save**.

<img src="https://mintcdn.com/nango/DcegLIzYgLEyo6lB/api-integrations/salesforce-jwt/app_policies.png?fit=max&auto=format&n=DcegLIzYgLEyo6lB&q=85&s=5bdf3903ef570289788e49b0a489381b" width="1691" height="778" data-path="api-integrations/salesforce-jwt/app_policies.png" />

#### Step 3: Obtain Client ID and Client Secret

1. In the **App Manager**, find your app and go to the **Settings** tab.
2. Click **Consumer Key and Secret** to view your credentials.

<img src="https://mintcdn.com/nango/DcegLIzYgLEyo6lB/api-integrations/salesforce-jwt/client_credentials.png?fit=max&auto=format&n=DcegLIzYgLEyo6lB&q=85&s=96c24c91ee325b2b4836d367797baa1c" width="1899" height="789" data-path="api-integrations/salesforce-jwt/client_credentials.png" />

3. Copy the **Consumer Key** (Client ID) and **Consumer Secret** (Client Secret).

<img src="https://mintcdn.com/nango/DcegLIzYgLEyo6lB/api-integrations/salesforce-jwt/consumer_credentials.png?fit=max&auto=format&n=DcegLIzYgLEyo6lB&q=85&s=67053c3954e740a557e5346eb293bcc2" width="1899" height="373" data-path="api-integrations/salesforce-jwt/consumer_credentials.png" />

#### Step 4: Find your Hostname

1. Click on your profile to view your hostname.

<img src="https://mintcdn.com/nango/IuAZEbXtz_qKHJSu/api-integrations/salesforce/hostname.png?fit=max&auto=format&n=IuAZEbXtz_qKHJSu&q=85&s=e2a9f4de05132bf51ebc513700cef99d" width="500" height="250" data-path="api-integrations/salesforce/hostname.png" />

#### Step 5: Enter credentials in Nango

1. In the Nango Connect UI or dashboard, select the Salesforce (Client Credentials) integration.
2. Enter your **Hostname**, **Client ID**, and **Client Secret**.
3. Click **Authorize** to establish the connection.

<img src="https://mintcdn.com/nango/U9nmnln3ztSo1ShU/api-integrations/salesforce-cc/form.png?fit=max&auto=format&n=U9nmnln3ztSo1ShU&q=85&s=6336d1d8dd7b3c27225ff5f4ff64138a" style={{maxWidth: "450px" }} width="500" height="699" data-path="api-integrations/salesforce-cc/form.png" />

You are now connected to Salesforce using Client Credentials.
