---
title: Registering a Salesforce App and Obtaining Client ID / Secret (for API Calls / OAuth)
date: 2025-12-30T06:37:56Z
modified: 2026-06-12T11:20:34Z
permalink: "https://ezintegrations.ai/docs/how-to-get-salesforce-client-id-and-secret/"
type: docs
status: publish
excerpt: ""
wpid: 3181
doc_category:
  - DIY Articles
author: Arun Thakur
---

## Overview

This guide explains how to register a Salesforce Connected App and obtain the Client ID and Client Secret required for OAuth-based API authentication.

These credentials are essential for enabling secure access to Salesforce APIs and supporting token-based authentication workflows.

---

## When to Use

Registering a Salesforce App is required when external systems or integration platforms need to access Salesforce data using OAuth.

- When configuring API-based integrations with Salesforce
- When implementing OAuth 2.0 authentication
- When generating access and refresh tokens
- When enabling third-party system connectivity
- When building automated integration workflows

---

## How It Works

Salesforce uses Connected Apps to manage OAuth authentication for external applications.

- Create a Connected App in Salesforce
- Enable OAuth settings
- Define callback URLs and scopes
- Generate Client ID and Client Secret
- Use credentials for API authentication

The generated credentials are used by external systems to request access tokens and refresh tokens.

---

## How to Configure

### Register Salesforce App

#### Step 1: Open Setup

Log in to your Salesforce account and click the **gear icon** in the top-right corner. Select **Setup**.

#### Step 2: Open App Manager

In the Setup search bar, type **app** and select **App Manager**.

#### Step 3: Create Connected App

Click **New Connected App** to create a new OAuth application.

#### Step 4: Configure OAuth Settings

Enter a name for your application and configure OAuth settings as follows:

- Enable **OAuth Settings**
- Add callback URLs (one per line):

📋

https://login.salesforce.com/services/oauth2/success


Configure OAuth scopes:

- Select **Full access**, or required scopes
- Enable **Perform requests on your behalf at any time (offline\_access)**

The offline access scope allows generation of refresh tokens and prevents repeated authentication.

#### Step 5: Save the Application

Click **Save** to create the Connected App.

---

## Retrieve Client ID and Client Secret

### Step 1: Access App Manager

Navigate to **Setup > App Manager**.

### Step 2: View Connected App

Locate the newly created application and click **View** from the dropdown menu.

### Step 3: Copy Credentials

On the App detail page:

- Click **Reveal** to view the Consumer Key and Consumer Secret
- Copy the Consumer Key (Client ID)
- Copy the Consumer Secret (Client Secret)
- Copy any required Callback URLs

These credentials are required for OAuth authentication and API access.

---

## Required Credentials

After completing the setup, the following values are used for Salesforce integration:

- Client ID (Consumer Key)
- Client Secret (Consumer Secret)
- Callback URL

All three values are required to establish OAuth-based connectivity.

---

## Troubleshooting

- **OAuth Authorization Failed:** Verify callback URL configuration.
- **Invalid Client ID:** Ensure correct Consumer Key is copied.
- **Missing Refresh Token:** Confirm offline\_access scope is enabled.
- **App Not Visible:** Check App Manager filters.
- **Authentication Loop:** Review OAuth scopes and redirect URLs.

---

## Frequently Asked Questions

 ### 1. What is a Connected App in Salesforce?

 A Connected App is an OAuth-enabled application that allows external systems to securely access Salesforce APIs.

 

 

  ### 2. Why is the offline\_access scope required?

 It enables refresh token generation, allowing long-term API access without repeated login.

 

 

  ### 3. Can I change the Client Secret later?

 Yes. The Client Secret can be regenerated from the App detail page if required.

 

 

  ### 4. Are multiple callback URLs supported?

 Yes. Multiple callback URLs can be added, with one URL per line.

 

 

  ### 5. Where are these credentials used?

 They are used in OAuth token requests and API authentication processes.

 

 

 ---

## Notes

- Store Client ID and Client Secret securely.
- Do not expose credentials in public repositories.
- Limit OAuth scopes to required access.
- Review Connected App permissions regularly.
- Regenerate secrets if credentials are compromised.

By following this guide, you can successfully register a Salesforce Connected App and obtain the required credentials for secure API and OAuth-based integrations.

## Topics

**Docs Categories:** [DIY Articles](https://ezintegrations.ai/wp-content/uploads/wp-mfa-exports/taxonomy/doc_category/diy-articles.md)