7

I am using Postman for some time now and it always worked. It seems that something has changed as I can directly authorize through OAuth and immediately after it all subsequent requests fail:

"Session expired or invalid"

Any ideas?

4 Answers 4

14

To add to Semmel's action (which helped me as well) alternative is to make API call in postman to a different address (and thus not having redirect that you can observe in Postman console).

Use :

https://<custom_domain>.my.salesforce.com/services/...

Instead of UI address:

https://<custom_domain>.lightning.force.com/services/...

3
  • That actually makes a lot of sense. I will look into it. Thanks for the addition!
    – Semmel
    Jan 5, 2022 at 12:35
  • This solution worked for my case.
    – Zhan Levov
    Apr 20, 2022 at 8:54
  • 1
    Since you supplied the "more correct" answer I will accept yours instead. To add to it (and make it 100% correct), always use the instance URL you got with the token instead of just using your custom domain - that way it will also work for sandboxes.
    – Semmel
    Sep 22, 2022 at 9:01
9

Okay - I already found the answer. It seems there's now a (new?) option in Postman that needs to be turned on:

enter image description here

Credits for this go to Ayisha Begum and the answer here: https://developer.salesforce.com/forums/?id=906F000000099xAIAQ

2
  • Thanks. This answer helped me too.. Jul 11, 2021 at 11:07
  • This has to be turned on because the request is most likely sent to the "wrong" URL. You have to send it to the instance URL you get as part of the process (together with the token) - if you don't do that your request needs to be redirected to the correct URL hence that's why you need this option.
    – Semmel
    Sep 22, 2022 at 9:04
1

Correcting Super Nova Follow Authorization header still exists in Postman under 'Settings'. Turning it on helped me

0

The Follow Authorization Header no longer seems to be a Postman setting;

For me the solution was to add the Authorization Bearer under the Headers tab in Postman - not under the Params tab.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .