function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gullu SfGullu Sf 

Developer Console returns "INVALID_SESSION_ID: This session is not valid for use with the REST API" when trying to create apex class

Hi There, I'm getting this error when Im trying to create apex code, Run a query or search piece of code in devConsole. I'm seeing this error for the first time. Anyone got this error anytime? 
Appreciate your response. Thanks!
 
TechingCrewMattTechingCrewMatt
I think what youre experiencing is caused by your Salesforce seesion to time out due to inactivity and Developer Console is trying to use the Session ID from the pervious session. If you close Developer Console and re-lauch it from a new session, it should be fine.

Hope that helps,
Matt Kowalski
Gullu SfGullu Sf
Thanks for your response Matt. But I tried that as the first option with no luck. 
TechingCrewMattTechingCrewMatt
Are you seeing any browser errors in the console when you hit F12? It could be a third-aprty cookie issue. Which browser are you using?
Gullu SfGullu Sf
Its resolved now. Basically In our environment, Any Client Api permission is disabled to all profiles and a separate permission set is being used to provide any “client api” access. Appreciate your concern. Regards Gautham