+ Start a Discussion
Mangaraj SahooMangaraj Sahoo 

Getting INVALID_SESSION_ID while trying REST API with a valid access token

Hello,
I followed the steps mentioned in article https://developer.salesforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com and for a given Connected App configuration I could get the Access Token by means of SoapUI as well as Google OAuth Play Ground. However, I am getting INVALID_SESSION_ID error when I try to access any https://na1.salesforce.com/services/data/v{version}/* URI. I have not made any changes to the default configurations relating to Session Settings.
Kindly help me to resolve this issue.
Thanks.
RamuRamu (Salesforce Developers) 
The answer might be in one of these posts

http://stackoverflow.com/questions/6095352/salesforce-rest-api-invalid-session-id-error

http://stackoverflow.com/questions/20515179/unable-to-connect-to-salesforce-using-restapi-invalid-session
https://developer.salesforce.com/forums?id=906F000000099x7IAA


 
Mangaraj SahooMangaraj Sahoo
Thanks.
That was a hostname issue. I copied the hostname "ap1" from Instance_Url to the resource URL (in which hostname was "na1") that i was trying to access and then the INVALID_SESSION_ID issue got resolved.

However, now i am facing another issue: API_DISABLED_FOR_ORG. Does this related to the user license? I have tried with enterprise as well as devloper (trial) licenses.