Salesforce API key: where to get one and its scopes

A Salesforce API key is the Consumer Key and Secret of an app you make in Setup: the clicks, the scopes and the editions that allow it.

Salesforce: 1 of 79 tools

  • SalesforceOAuth app (external client app)Consumer Key and Consumer Secret. Salesforce has no single API key: since Spring '26 new connected apps cannot be created, so you create an external client app. ยท API access is included in Enterprise, Unlimited, Developer and Performance editions. Professional Edition needs the Web Services API add-on.
    Where to click
    Setup (gear icon) > Quick Find: External Client App Manager > New External Client App > fill External Client App Name, API Name, Contact Email > Distribution State: Local > API (Enable OAuth Settings): check Enable OAuth > enter a Callback URL > add the OAuth scopes > Create > open the app > Settings tab > OAuth Settings > Consumer Key and Secret > enter the code Salesforce emails you > copy the Consumer Key and Consumer Secret
    Scopes or permissions
    Manage user data via APIs (api) and Perform requests at any time (refresh_token, offline_access). Your user also needs the API Enabled permission.

    Source: trailhead.salesforce.com (opens in a new tab), trailhead.salesforce.com: mobilesdk intro security (opens in a new tab), help.salesforce.com: articleView (opens in a new tab), help.salesforce.com: articleView (opens in a new tab), trailhead.salesforce.com: api basics overview (opens in a new tab), salesforce.com: blog (opens in a new tab)

Photo of Utku Zihnioglu

By

ยท CEO & co-founder

Updated Nov 11, 2026

Shorter page: the tool first, the answer in a few lines.

There is no single Salesforce API key. What you need is a pair, a Consumer Key and a Consumer Secret, issued by an external client app you create in Setup with OAuth turned on. A Salesforce user then allows that app, and only then can your code call the API.

The steps above come from Salesforce's own pages, among them the Trailhead API basics module and Salesforce Help on external client apps, with the day we last checked them. Settings we could not confirm on a Salesforce page are left out.

Two steps that surprise people

You enter a Callback URL while the app is still being created, before you have the key. And Salesforce may email you a code before it shows the Consumer Secret.

Why an app with the right scopes still fails

Scopes and user permissions are separate checks, and both have to pass. The scope lets the app call the API. The API Enabled permission lets the user who allows the app do the same.

The edition is the third check. If your org's edition does not include API access, no amount of setup gets around it, so look at the editions first.

The pair alone reads nothing. Once a user allows the app, Salesforce issues a short-lived access token that each call carries, and a refresh token if the app asked for the refresh_token scope. Keep the Consumer Secret and the refresh token in a secrets manager, never in code or a chat; the Consumer Key only identifies the app.

What to do next

For your own script, size your calls against the org's daily API allocation by edition before the first job runs. For writes, decide between upsert and update first.

To connect Salesforce to Oneprofile you need no key at all: sign in to Salesforce and allow access, and access stays current on its own. Choose a sandbox, or enter your My Domain, first if your org needs it.

Salesforce API key: common questions

How do I get a Salesforce API key and secret?

Create an external client app in Setup with OAuth turned on, then open its Settings tab and select Consumer Key and Secret under OAuth Settings. Salesforce may email you a code to confirm it is you before it shows the two values.

Can I still create a connected app in Salesforce?

Not by default. Salesforce now blocks new connected apps in the UI and the Metadata API, except through package installation, and points you to external client apps instead. Connected apps you already have keep working.

Does Salesforce Professional Edition include API access?

Not by default. Professional Edition needs the Web Services API add-on before any app can call the API, and no setup gets around it.

About this article

Photo of Utku Zihnioglu

Utku Zihnioglu

CEO & co-founder

Serial entrepreneur who built infrastructure companies handling billions of requests. Now leads engineering at Oneprofile, which finds the people worth talking to, researches each one, and follows up until they reply.

Drafted with AI from our product docs and code. Utku Zihnioglu answers for what it says.

Connect Salesforce without a key

Sign in to Salesforce from Oneprofile once, and access stays current on its own.

Free plan: 200 credits a month, 3 integrations, no card

Connect Salesforce without a key

Sign in to Salesforce from Oneprofile once, and access stays current on its own.

Free plan: 200 credits a month, 3 integrations, no card