Loading

Salesforce Platform: "This Session Is Not Valid for Use with the REST API" Error in Developer Console When API Allowlisting Is Enabled

Data pubblicazione: Aug 18, 2026
Descrizione

When the "For admin-approved users, limit API access to only allowlisted connected apps" setting is enabled in a Salesforce org, opening the Developer Console can show the error "This session is not valid for use with the REST API." This happens because the Developer Console runs on top of the REST API, which is one of the API types this setting restricts.

Steps to Reproduce

  1. Log in to the org (API Client Control must be enabled).
  2. Go to Setup > API Client Control.
  3. Enable "For admin-approved users, limit API access to only allowlisted connected apps."
  4. Open the Developer Console. The error "This session is not valid for use with the REST API" appears.
Risoluzione

This article explains why the Developer Console shows a REST API session error when API allowlisting is enabled, and what options admins have to work around it.

Why This Happens

For the "For admin-approved users, limit API access to only allowlisted connected apps" setting, this behavior is considered working as designed. The Developer Console is built on top of the REST API, and the REST API is one of the API types blocked by this setting.

Workaround

One workaround is to enable the profile permission "Use Any API Client" and assign that profile to the appropriate users.

Note: Enabling this permission also allows usage of all connected apps, not just the Developer Console, so weigh this against your org's security requirements.

Long-Term Recommendation

The Developer Console is in maintenance-only status, and Salesforce is only making changes for serious security issues — this behavior isn't expected to change. Salesforce recommends switching to modern developer tools such as Salesforce CLI, VS Code, and Salesforce Code Builder whenever possible.

Numero articolo Knowledge

004637119

 
Caricamento
Salesforce Help | Article