Connecting Salesforce Org With Postman 1702910793
Connecting Salesforce Org With Postman 1702910793
❖ In your Trailhead Playground, from Setup, enter cors in the Quick Find box
and select CORS.
❖ In the Allowed Origins List, click New.
❖ Enter https://*.postman.com as the Origin URL Pattern.
❖ Click Save.
❖ Select CORS again.
❖ Click New and enter https://*.postman.co (note the .co domain extension) as
the Origin URL Pattern.
❖ Click Save.
Sign Up for Postman and Create a Workspace
Postman has two options for working with its app: desktop and web. You use the
web browser app for this project.
❖ Sign in to your Postman account or sign up for an account.
❖ Select the Workspaces menu.
❖ Select Create Workspace.
❖ Name your workspace SalesforceCollection.
❖ Set Visibility to Personal.
❖ Click Create Workspace.
You need to authenticate with Salesforce to access the APIs. Authentication grants
you an access token that's valid for a certain duration. Repeat this process
whenever your access token expires.
Post an Account
You just pulled some data from the org. Let's try adding some new data to the org.
❖ Under REST, select SObject, and then select POST SObject Create.
❖ Open the Params tab.
❖ Under Path Variables, in the SOBJECT_API_NAME row, VALUE column,
enter Account.
❖ Open the Body tab.
❖ Replace the body text with this code:
{
"Name": "Postman",
"BillingState": "CA"
}
❖ Click Save.
❖ Click Send.
❖ Postman returns the id for the new account.