Loading

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

Fecha de publicación: Mar 25, 2026
Descripción

When "For admin-approved users, limit API access to only allowlisted connected apps" setting is enabled, accessing Developer Console may show an error "This session is not valid for use with the REST API".

To replicate this error:

  1. Login to Org (API Client Control needs to be Enabled)
  2. Go to Setup -> API client control
  3. Enable "For admin-approved users, limit API access to only allowlisted connected apps"
  4. Then open Developer Console , you can see an error "This session is not valid for use with the REST API"
Solución

For the purpose of 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; The REST API lies in the API types blocked by this exact setting.

One workaround is to enable Profile Permission "Use Any API Client" and assign the profile to the appropriate users.
Note: doing so will also allow usage of all the Apps.

In the long term, Developer Console is in maintenance-only status and Salesforce is not making changes other than serious security issue fixes, hence this behavior is not going to change.
Salesforce recommends switching to modern developer tools, such as Salesforce CLI, VS Code and Salesforce Code Builder whenever possible.

 

Número del artículo de conocimiento

004637119

 
Cargando
Salesforce Help | Article