Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Set Up and Connect Postman

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.

  1. Sign in to your Postman account or sign up for an account.
  2. Select the Workspaces menu.
  3. Select Create Workspace.
  4. Name your workspace SalesforceCollection.
  5. Set Visibility to Personal.
  6. Click Create Workspace.

Fork the Salesforce Collection

  1. Open the public Salesforce Developers workspace to create a fork of the Salesforce APIs collection.
  2. In Collections, select Salesforce Platform APIs to expand it.
  3. Click Create Fork to create a fork of the collection.
  4. Enter MySalesforceAPIFork.
  5. Keep SalesforceCollection as the Workspace.
  6. Click Fork Collection.

You now have the collection ready in Postman. Let's use the collection to authorize your org and test it.

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.

  1. Be sure you're logged in to only one Trailhead Playground in your browser.
  2. In Postman, under Collections, Salesforce Platform APIs should be selected.
  3. Be sure No Environment is selected.
  4. The Authorization tab should be open.
  5. Type should be OAuth 2.0.
  6. Click Get New Access Token.
Note

If you're not logged in to a Trailhead Playground or Salesforce org, a browser tab opens with the Salesforce login screen. Enter the username and password you saved in step 1 to log in.

  1. Click Allow to let the “Salesforce Platform APIs Collection for Postman” access your Trailhead Playground.
    In the Allow Access? Dialog, click Allow to allow the Salesforce APIs Collection for Postman to access your basic information and to access and manage your data, or click Deny. To revoke access at any time, go to your personal settings.
  2. A success message appears briefly, and then you're redirected to the Manage Access Tokens dialog.
    The Manage Access Tokens box shows the Token Name, Access Token, Token Type, instance_url, issued_at, signature, and scope
  3. Verify that the instance_url points to your Trailhead Playground.
  4. Copy the instance_url to use in step 12. Be sure to copy only the URL with no extra characters.
  5. Click Use Token.
  6. Open the Variables tab.
  7. In the _endpoint row, CURRENT VALUE column, paste the instance_url value that you copied in step 9.
  8. Click Save.

A Quick Connection Test

Let's verify that the connection is working.

  1. In Collections, select Salesforce Platform APIs to expand it.
  2. Select REST to expand it.
  3. Select GET Limits.
    Limits opens in the main panel.
  4. Click Send.
    Postman GET Limits tab with Body response displayed in the main panel. Status shows 200 OK.
  5. 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.
    Follow Authorization header setting under Get Request Settings

You've successfully authenticated with Salesforce. Now you can use other requests in the collection.

Post an Account

You just pulled some data from the org. Let's try adding some new data to the org.

  1. Under REST, select SObject, and then select POST SObject Create.
  2. Open the Params tab.
  3. Under Path Variables, in the SOBJECT_API_NAME row, VALUE column, enter Account.
  4. Open the Body tab.
  5. Replace the body text with this code:
    {
      "Name": "Postman",
      "BillingState": "CA"
    }
  6. Click Save.
  7. Click Send.
    Postman returns the id for the new account.
    Postman with SObject Create displayed in the main panel showing the replaced Body and Send results. Status shows 201 Created.
  8. Verify that the status is 201 Created.
Note

If you don't get the status 201 Created then you might be signed into a different org. Verify that your instance_url is set to your Trailhead Playground.

  1. Open the authorized Playground.
  2. From the App Launcher (“”), find and open Accounts.
  3. Verify that the new account is now there.

Excellent! You've set up Postman to interact with your org. The Salesforce APIs for Postman collection that you loaded will aid you in your quest to discover the Salesforce APIs.

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기