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
Steve FarmerSteve Farmer 

Authentication using Postman


I am trying to envoke an APEX class I wrote to retrieve cases using REST in Postman. I am unable to figure out how to authenticate to get a propper session established. I created the class in the sandbox. Any help would be appreciated.

If you want to verify salesforce REST API, you can use the workbench tool, which contains the REST explorer which allows to GET or POST to your webservice. Follow the below steps
User-added image

If you want to try it PostMan, here is the some of the blog post contains step by step instructions
Amit Chaudhary 8Amit Chaudhary 8

Please check below post for same

Test Salesforce API by Postman Rest Client | Postman and Salesforce | Calling APEX Rest service using Postman| OAuth 2.0


Let us know if this will help you
Hi Amit,
can you please help me with this problem I am facing?
I tried to follow exact steps for Direct URL in the above link , I get 400 Bad request (The request cannot be fulfilled due to bad syntax).
Below is my POST request.*****************RFpa.xkpUlE7VZHvUwUPGxnPAag&client_secret=3271256955005527931&username=**********&password=**************
I used all url params corrcet I double-triple checked. password I used password_security token. No mistake in that.
May I know what can be the reason? This is my personal dev sandbox. What is wrong here? Anybody facing same issue?

For the second method using wizard can you please post  the complete url for CallBack URL, Auth URL and Access Token URL? I get the below error when using the wizard method.
When using wizard, I get the below error. Also I do not see the grant type drop down that is shown in your screen shots.
<error_description>grant type not supported</error_description>
My screen looks like below.
User-added image
Vijaya Raghava Reddy KVijaya Raghava Reddy K
Your OAuth authorization end point is wrong.
You need to use the correct Salesforce OAuth endpoint when issuing authentication requests in your application. The primary OAuth endpoints are:
For authorization:
For token requests:
For revoking OAuth tokens:
Lucas JordanLucas Jordan

Current as of August 2018 

I has some issues trying to get API access with postman in my sanbox organisation I was able to resolve my issues with the following details.

In options for Connected APP inside Salesforce Org set Callback URL to.

And with the following Oauth2 details

Grant Type: Authorization Code

Callback URL:

Auth URL:

Access Token URL:

Client ID: {Client ID}

Client Secret: {Client Secret}

Scope: {blank}

State: {blank}

Client Authentication: Send client credentials in body

Oracle APIOracle API
Thanks Lucas !!

I was facing the same issue. I followed your steps and able to fix my problem. 
Thanks for sharing valuable information.
Keep posting ..
Natalya Murphy 8Natalya Murphy 8
Thanks Lucas Jordan.  One other thing I had to do was UNCHECK the "Request access token locally" checkbox
Ashish FugatAshish Fugat
while generating token i'm getting below error -

I have used these details
Grant Type: Authorization Code
Callback URL:
Auth URL:
Access Token URL:
Client ID: {MY Client ID}
Client Secret: {MY Client Secret}
Scope: {blank}
State: {blank}
Client Authentication: Send client credentials in body
Rekha Rani 5Rekha Rani 5
while generating the access token using Oauth 2.0 please don't give spaces after the AuthURL,Access Token URL,Client ID and  Client Secret:
Suraj Tripathi 47Suraj Tripathi 47
Hi Steve Farmer,
Here is the step-by-step process please follow the below link.
Link :-

If you face any problem then post it.
Please mark it as the best answer if it helps you to fix the issue.

Thank you!

Suraj Tripathi.