You need to sign in to do that
Don't have an account?
Steve Farmer
Authentication using Postman
Hi,
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.
Steve
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.
Steve
If you want to try it PostMan, here is the some of the blog post contains step by step instructions
https://forceadventure.wordpress.com/2013/01/31/creating-a-custom-rest-api-in-salesforce/
http://www.mstsolutions.com/blog/content/testing-salesforce-web-service-using-postman-rest-client
http://kalyanlanka.blogspot.ca/2014/08/calling-apex-rest-service-using-postman.html
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
1) http://amitsalesforce.blogspot.com/2017/06/test-salesforce-api-by-postman-rest.html
Let us know if this will help you
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.
https://na35.salesforce.com/services/oauth2/token?grant_type=password&client_id=3MVG9szVa2RxsqBZ.1fdpVIoPft1WRAebdZUT*****************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.
<OAuth>
<error>unsupported_grant_type</error>
<error_description>grant type not supported</error_description>
</OAuth>
My screen looks like below.
Thanks,
MK7
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: https://login.salesforce.com/services/oauth2/authorize
For token requests: https://login.salesforce.com/services/oauth2/token
For revoking OAuth tokens: https://login.salesforce.com/services/oauth2/revoke
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_oauth_endpoints.htm
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. https://www.getpostman.com/oauth2/callback
And with the following Oauth2 details
Grant Type: Authorization Code
Callback URL: https://www.getpostman.com/oauth2/callback
Auth URL: https://test.salesforce.com/services/oauth2/authorize
Access Token URL: https://test.salesforce.com/services/oauth2/token
Client ID: {Client ID}
Client Secret: {Client Secret}
Scope: {blank}
State: {blank}
Client Authentication: Send client credentials in body
I was facing the same issue. I followed your steps and able to fix my problem.
Thanks for sharing valuable information.
Keep posting ..
error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration
I have used these details
Grant Type: Authorization Code
Callback URL: https://www.getpostman.com/oauth2/callback
Auth URL: https://test.salesforce.com/services/oauth2/authorize
Access Token URL: https://test.salesforce.com/services/oauth2/token
Client ID: {MY Client ID}
Client Secret: {MY Client Secret}
Scope: {blank}
State: {blank}
Client Authentication: Send client credentials in body
Here is the step-by-step process please follow the below 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!
Regards,
Suraj Tripathi.