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

REST API Access gives INVALID_SESSION_ID as a result



I know there are several posts on this subject, but none of them have solved my problem. I have successfully completed the OAUTH2 workflow and gotten an Access Token and Instance URL from the OAuth2 Redirect. I then save these two and now am trying to access data using curl, as shown below.


$ curl '' -H 'Authorization: Bearer access_token
I get the following as the response:
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
The following works fine:

I have reviewed the following posts:


One of them mentions I need to send an email to Alex to enable API Remote Access - is that still needed?
Note that the Access Token is correct and is fresh (only 10 minutes old). Instance_url is also correct.