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
Mark Z DeanMark Z Dean 

Getting Session Expired Message with Postman

I have setup a connected app and I am using Postman to query some data but I keep getting the following message:
 
[
    {
        "message": "Session expired or invalid",
        "errorCode": "INVALID_SESSION_ID"
    }
]
I can successfully get the session id in Postman and using it in the request but have tried other settings in Postman and it still doesn't work. Need some help please.
 
Best Answer chosen by Mark Z Dean
Mark Z DeanMark Z Dean
Silly me, I had the wrong URL and that's why it wasn't working. Lesson learnt - make sure the URL is correct and use the one that's returned with the authentication response.

All Answers

ANUTEJANUTEJ (Salesforce Developers) 
As mentioned in https://developer.salesforce.com/forums/?id=906F000000099xAIAQ can you try sending the password with security token and see if it works.

Looking forward to hearing back from you.
Mark Z DeanMark Z Dean
As I mentioned, I am able to get the session id without any problem. The password and securty token should not be needed after that. Its once I start using the sesison id,  I am getting the error above.
Mark Z DeanMark Z Dean
Silly me, I had the wrong URL and that's why it wasn't working. Lesson learnt - make sure the URL is correct and use the one that's returned with the authentication response.
This was selected as the best answer