The WesternTech » Integrations » Connect Salesforce with Postman Application and Test REST API
Scenario : As a Salesforce Consultant, I like to connect the Salesforce with Postman Application. For this demo, I am using Salesforce Developer Org.
Salesforce provides the Connected App, which is a framework that enables an external application to integrate with Salesforce using APIs and standard protocols such as SAML, OAuth, and OpenID Connect.
By using Connected App keys, we can connect Salesforce with the Postman Application.
Postman is an API platform used for building and utilizing APIs. We can utilize Postman to test APIs and their responses.
First, we need to Setup the Connected App in Salesforce to connect any other applications. Once you login to Salesforce, navigate to Connected App
Create a new Connect App in Salesforce
In Salesforce, go to the Quick Search bar and search for “App Manager“. Then, click on the “New Connected App” button and enter the required details.
These information
- Connected App Name
- API Name
- Additionally, check the box labeled “Enable OAuth Settings” and provide the Callback URL, which is where the authorization code will be sent in case of OAuth. This URL can be any valid URL.
- Under the “Selected OAuth Scopes” section, select “Full access (full)” and Leave all other options as they are and click on the “Save” button.
Once completed, you will see the corresponding confirmation screen.
Copy new Secret Keys
Once you have configured the connected app, you will be able to access new secret keys.
To do this, follow these steps:
- On the new connected app, click “Manage Consumer Details” which will ask you to verify your identity by providing a verification code.
- You should then be able to copy the consumer key and consumer secret.
At this point you finished configuring the Salesforce Connected App.
Postman Application Download and Install
Download and install Postman. It is a free tool. Once you open Postman, it should look like the image below:
Postman Configuration
There are different ways to do this, but for this example, we’ll use OAuth Authentication since it’s popular and recommended. To get started, open up Postman and create a new request by clicking the “+” button. Follow the configuration as in below image :
Note
The Callback URL should be the callback URL from the Salesforce connected App.
The Client Id should be the consumer key from the Salesforce Connected App.
Authorization URL – https://login.salesforce.com/services/oauth2/authorize
Token Request URL – https://login.salesforce.com/services/oauth2/token
Getting New Access Token
Once the configuration is completed, click on the “Get New Access Token” button. This will prompt you to enter your Salesforce credentials.
Upon successful authentication, you will receive a new token. Click on the “Use Token” button to proceed further.
Do not share this token with anyone as it is sensitive.