You can use the Postman desktop app with environments to work with multiple Salesforce orgs in parallel.
⚠️ Using environments means that you will store Salesforce credentials in clear in Postman. Do this at your own risks.
- Import the Template Environment
- Configure the Environment
- Change the Collection Authorization Type
- Authenticate with Salesforce
-
Using a browser, sign up/in to Postman.
-
Open the main collection with this link.
-
Select the Environments tab (item A in following screenshot)
-
Click Salesforce Environment Template (B)
-
Click on the “three dots” icon on the right (C) and select Export from the menu.
This downloads a
Salesforce Template Environment.postman_environment.json
file. -
Close the browser tab. We'll continue the installation on the Postman app.
-
In the Postman app, click Import.
-
Drag and drop the JSON file you just downloaded in the gray zone.
-
Click Import.
-
Click on the Manage Environment icon
-
Click on the Duplicate Environment icon next to the Salesforce Template Environment
This creates a
Salesforce Environment Template Copy
template. -
Click Salesforce Environment Template Copy.
-
Rename the environment with something meaningful in relation with your Salesforce org (e.g.: “Playground 1”).
-
Set values in the CURRENT VALUE column for the following variables:
Variable Current Value url
Either:
-https://test.salesforce.com
for sandboxes or Scratch orgs.
-https://login.salesforce.com
for production, Trailhead Playground and Developer Edition orgs.
- your custom My Domain URL.username
Your username password
Your password secretToken
Your personal security token (if required by your org) -
Click Update and close the environments dialog.
-
Select your environment from the environment dropdown.
-
Move your mouse over the “Salesforce APIs” collection, click on the “three dots” icon next to it and select Edit from the menu.
-
In the Authorization tab, select Bearer Token as the authorization type.
-
Enter
{{_accessToken}}
for the Token value. -
Click Update
- Open the collection’s Auth folder and select the SOAP Login request
- Click Send
At this point, if your environment is correctly set up, you should see a 200 OK
status. This means that you have successfully authenticated with Salesforce and that you can now use the other collection’s requests.