Skip to main content

Prerequisites

  • Salesforce account (personal or business)
  • Access to Salesforce Developer Portal

Step 1: Create Salesforce Developer Account

  1. Visit https://developer.salesforce.com/
  2. Click “Sign Up” or “Login” if you already have an account
  3. Sign in with your Salesforce account or create a new developer account
Salesforce Developer Login

Step 2: Enable Connected Apps

  1. Once logged in, go to “Setup Menu” (Gear Icon) and click “Setup”
  2. Search “External Client Apps” in the “Quick Find” search box
  3. In “External Client App Settings”, enable “Allow creation of connected apps”
  4. Click “New Connected App”
Salesforce App Creation

Step 3: Fill Basic App Information

  1. Fill the necessary app details:
    • Connected App Name: Your application name (e.g., your brand name)
    • API Name: Auto-generated from app name (only letters, numbers, and underscores allowed)
    • Contact Email: Your contact email for Salesforce support
    • Contact Phone: Your contact phone for Salesforce support
    • Logo Image URL: (Optional) HTTPS URL for your app logo (max 100 KB, preferably under 20 KB)
    • Info URL: (Optional) Web page with more information about your app
    • Description: (Optional) Up to 256 characters describing your app
    Basic App Information
Klavis Salesforce MCP Server uses the following OAuth scopes: api,refresh_token,offline_access
  1. In the API (Enable OAuth Settings) section:
    • Select “Enable OAuth Settings”
    • Callback URL: Enter https://api.klavis.ai/oauth/salesforce/callback
  2. Select OAuth Scopes: Move required scopes from “Available OAuth Scopes” to “Selected OAuth Scopes”:
    • Manage User Data via APIs (api) - required to manage user data via APIs
    • Perform requests on your behalf at any time (refresh_token, offline_access) - required to perform requests at any time
  3. Additional Settings:
    • Enable “Require Secret for Web Server Flow” if your app can keep the client secret confidential
    • Enable “Require Secret for Refresh Token Flow”
    • Enable “Enable Authorization Code and Credentials Flow”
    • Disable “Require PKCE Extension for Supported Authorization Flows”
  4. Click “Save” to create the app

Step 4: Get Consumer Key and Secret

After creating the app, follow these steps to get the credentials.
  1. From dashboard, go to “Setup Menu” (Gear Icon) and click “Setup”
  2. Search “App Manager” in the “Quick Find” search box
  3. Find your connected app in the list and click the dropdown arrow, then select “View”
View Connected Apps
  1. In the API (Enable OAuth Settings) section, click “Manage Consumer Details”
  2. Verify your identity using the verification code sent to your email
  3. Copy the Consumer Key and Consumer Secret (keep them secure!)
Get Consumer Key and Secret

(Optional) Step 5: White Labeling

White labeling allows you to customize the OAuth experience with your own branding instead of Klavis AI’s.
If you want to use your own Salesforce OAuth application with custom branding:
  1. Configure White Labeling: Go to https://www.klavis.ai/home/white-label
  2. Add Your Credentials: Enter your Salesforce Consumer Key and Consumer Secret from Step 5
  3. Set Redirect URI: Use https://api.klavis.ai/oauth/salesforce/callback or your custom callback URL
  4. Initiate OAuth: Use your Client Id when starting the OAuth flow:
    // Example: Initiating Salesforce OAuth with white-label
    const authUrl = `https://api.klavis.ai/oauth/salesforce/authorize?instance_id=${instanceId}&client_id=${yourClientId}`;
    window.location.href = authUrl;
    
For detailed white labeling implementation and code examples, see our OAuth & White Labeling guide.

Resources

I