0% found this document useful (0 votes)
5 views6 pages

Connecting Salesforce Org With Postman 1702910793

This document provides a step-by-step guide on setting up and connecting Postman to Salesforce, including configuring CORS, creating a workspace, forking a Salesforce API collection, and authorizing the org. It also details how to test the connection and post new data to Salesforce. The instructions are aimed at ensuring successful communication between Postman and Salesforce APIs.

Uploaded by

khajapeer shaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Connecting Salesforce Org With Postman 1702910793

This document provides a step-by-step guide on setting up and connecting Postman to Salesforce, including configuring CORS, creating a workspace, forking a Salesforce API collection, and authorizing the org. It also details how to test the connection and post new data to Salesforce. The instructions are aimed at ensuring successful communication between Postman and Salesforce APIs.

Uploaded by

khajapeer shaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Set Up and Connect Postman

Set Up Your Org

Set Up Cross-Origin Resource Sharing in Salesforce


Cross-Origin Resource Sharing (CORS) allows code running in a web browser to
communicate with Salesforce from a specific origin. Let's add the URL patterns for
Postman.

❖ 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.

Fork the Salesforce Collection

❖ Open the public Salesforce Developers workspace to create a fork of the


Salesforce APIs collection.
❖ In Collections, select Salesforce Platform APIs to expand it.
❖ Click Create Fork to create a fork of the collection.
❖ Enter MySalesforceAPIFork.
❖ Keep SalesforceCollection as the Workspace.
❖ Click Fork Collection.

Authorize Your Org

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.

❖ Be sure you're logged in to only one Trailhead Playground in your browser.


❖ In Postman, under Collections, Salesforce Platform APIs should be selected.
❖ Be sure No Environment is selected.
❖ The Authorization tab should be open.
❖ Type should be OAuth 2.0.
❖ Click Get New Access Token
A success message appears briefly
❖ Verify that the instance_url points to your Trailhead Playground.
❖ Copy the instance_url to use in step 12. Be sure to copy only the URL with
no extra characters.
❖ Click Use Token.
❖ Open the Variables tab.
❖ In the _endpoint row, CURRENT VALUE column, paste the instance_url
value that you copied in step 9.
❖ Click Save.

A Quick Connection Test

Let's verify that the connection is working.

❖ In Collections, select Salesforce Platform APIs to expand it.


❖ Select REST to expand it.
❖ Select GET Limits.
❖ Limits opens in the main panel.Click Send.
Verify that the status is 200 OK.

You may need to turn Follow Authorization header configuration ON to retain


authorization header when a redirect happens to a different hostname.

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy