How to connect Salesforce to Composio with your own OAuth app
NOTE: Composio ingress IPs. Composio connects to Salesforce from these IP addresses:
52.72.72.59
54.243.138.89
54.224.131.195
34.233.50.61Add them to your allowlists if you use either of these Salesforce settings:
Enforce Refresh Token IP Allowlist (in your External Client App or Connected App OAuth settings): add these IPs to the allowlist and wait 30–45 minutes before enabling it. Otherwise, token refreshes fail with “IP restricted by the app developer”.
Login IP Ranges or Network Access trusted IPs: add these IPs, or set the app’s IP Relaxation policy to suit your setup.
In this guide, I’ll share the process for customizing the auth config for Salesforce using External Client Apps. So, let’s begin.
Setting up Salesforce
In this section, we’ll go through the process of setting up Salesforce and creating an External Client App for OAuth 2.0 Web Server flow (authorization code grant).
NOTE: If you already have a Salesforce account, you can skip the first step.
Step 1: Create a Salesforce Developer Account (Optional)
If you don’t already have one, create a Salesforce Developer account.
This gives you a sandbox environment (Dev Org) where you can safely configure your apps. If you’re following along in your own Salesforce account you can also launch that instead.
Option A: External Client Apps (default for new orgs)
Step 2A: Create an External Client App
Once your org is ready, you can create an External Client App to generate the OAuth Client ID and Client Secret.
Log in to your Salesforce org.
Click the gear icon → Setup.
In the Quick Find box, search for App Manager and click it.

Click New External Client App in the top-right corner.

Fill in the basic info:
App Name:
Customer Order Status(or any name for your integration)API Name: auto-fills from the name (
Customer_Order_Status)Contact Email: your email
Distribution State: keep as Local
(Optional) Add a logo and description

Step 3A: Enable OAuth Settings
Now expand OAuth Settings and configure the app for OAuth:
Check Enable OAuth.
Add a Callback URL. For Composio, use either of these (use the same one as the Redirect URI in your Composio auth config):
https://backend.composio.dev/api/v3/toolkits/auth/callbackhttps://backend.composio.dev/api/v1/auth-apps/addSelect OAuth Scopes. Common ones include:
Full access (full)
Access and manage your data (api)
Perform requests on your behalf at any time (refresh\_token, offline\_access)
(Optional) OpenID for ID tokens

In the Security section:
Keep Require Secret for Web Server Flow checked.
Keep Require Secret for Refresh Token Flow checked.
Uncheck Require PKCE (unless you want PKCE).

Save the app.
You’ll now have a Client ID (Consumer Key) and Client Secret (Consumer Secret). You can find them in the Settings tab → OAuth Settings, and then go to the Consumer Key and Secret page.


Step 3A (Optional): Add Composio’s IPs to the Refresh Token IP Allowlist
If your org turns on Enforce Refresh Token IP Allowlist, Salesforce accepts refresh-token requests only from IPs on the allowlist. Composio uses the refresh token to keep your connection active, so you need to add Composio’s IPs. Otherwise the connection works at first, then fails when the access token expires with “IP restricted by the app developer”.
In Setup, search External Client App Manager in Quick Find and open it.
Find your app, click the dropdown arrow at the end of its row, and choose Edit Settings.

Expand OAuth Settings. If Enforce Refresh Token IP Allowlist is checked, scroll to Refresh Token IP Allowlist.
Click + and add each of these IPs, using the same value for Start IP Address and End IP Address:
54.224.131.19554.243.138.8952.72.72.5934.233.50.61

Click Save.
NOTE: Add the IPs and wait 30–45 minutes before you turn on Enforce Refresh Token IP Allowlist. If the checkbox is unchecked, you can skip this step. Some orgs also require Limit Idle Refresh Token Time-to-Live (TTL) to 30 Days; in those orgs, a connection unused for 30 days expires and must be reconnected.
Option B: Connected Apps
You can also create the traditional Connected Apps with Salesforce. To enable it:
Search External in Quick Find → Open External Client App Settings

Enable Allow creation of Connected Apps → New Connected App

Then,
Fill in:
Connected App Name (API Name auto-fills)
Contact Email
Optional: logo, description, phone and icon

Expand API (Enable OAuth Settings) → check Enable OAuth
Callback URL: use either of these (use the same one as the Redirect URI in your Composio auth config):
https://backend.composio.dev/api/v3/toolkits/auth/callbackhttps://backend.composio.dev/api/v1/auth-apps/addOAuth Scopes (recommended/required):
Access the identity URL service (id, profile, email, address, phone)
Access unique user identifiers (openid)
Access and manage data (api, web)
Access Connect REST API resources (chatter_api)
Full access (full)
Perform requests on your behalf (refresh_token, offline_access)

Under OAuth Policies
Enable Web Server Flow
Enable Refresh Token Flow
Enable Client Credentials flow
Enable Authorisation Code and credentials flow
Enable token exchange flow
Require Secret for Token Exchange Flow
Save the Connected App. Salesforce may take ~10 minutes to fully provision it.
Once done:
Go back to App Manager.
Find your app → click the dropdown → View.

Click Manage Consumer Details (you may need to verify identity).
Copy the Consumer Key (Client ID) and Consumer Secret.

Step 4: Create the Auth Config in Composio
With your Client ID and Client Secret ready, open the Composio dashboard.
Sign in, choose your project from the Projects menu, and click Auth Configs in the left sidebar.

Click Create, search for
salesforce, and choose Salesforce. Don’t pick Salesforce Data 360 or Salesforce Service Cloud; those are separate toolkits.
Make sure OAuth 2.0 is selected, name the config if asked, and choose Your Own Credentials.
In the Credentials section, fill in:
Client ID: the Consumer Key from your Salesforce app.
Client Secret: the Consumer Secret from your Salesforce app.
Redirect URI: the dashboard fills in
https://backend.composio.dev/api/v1/auth-apps/add. Add this URL as a Callback URL in your Salesforce app. To usehttps://backend.composio.dev/api/v3/toolkits/auth/callbackinstead, click the pencil icon and change it. Whichever one you choose, use the same URL here and in Salesforce.Scopes: default scopes are pre-filled. Most apps don’t need to change them.

Click Create Auth Config. The new auth config opens with its ID (
ac_...). Copy it to use in your app code.
Step 5: Connect your Salesforce account
In the auth config panel, click Connect Account.
Fill in the connection form, then click Connect Account:
Salesforce Subdomain: the part of your Salesforce URL before
.salesforce.com. Most orgs can keep the defaultlogin; Composio detects your real instance after you sign in. If your org requires My Domain login, enter the My Domain part, for exampleacme.myforacme.my.salesforce.com(find it in Setup by searching My Domain). For a sandbox, entertest.Instance endpoint: the Salesforce API version path. Keep the default
/services/data/v67.0unless your org needs a different API version.

Sign in to Salesforce if asked, review the permissions, and click Allow.

You’re sent back to the dashboard, where the new connected account shows as Active.

NOTE: Salesforce allows only 5 approvals per user for each app. If the consent screen says you have granted access 5 times, clicking Allow revokes your oldest approval, which disconnects that older Composio connection. To keep it, click Deny and revoke an approval you no longer need first.