Posts

Showing posts with the label REST Services

Connecting to Salesforce using Postman

Postman is very handy tool when it comes to test REST APIs. Being it standard APIs exposed by Salesforce or custom services that you have developed. But sometimes it becomes tricky to just get into Salesforce environments due to N number of reasons. Though, Postman provides a variety of ways to login to Salesforce, its good to be aware of a quick and easy way. Let's check it out step by step. Step 1: Get the active Session Id from Salesforce Session Ids can be obtained in variety of ways. But not all retrieved Ids supports the API.  Also, Salesforce has stopped showing the session id in logs (You will see "SESSION_ID_REMOVED" text instead).  Quickest way to get active and valid session id which can be used for API calls is to get it from cookies. Login to saleforce -> switch to classic -> open browser console -> Run document.cookie.match(/(^|;\s*)sid=(.+?);/)[2]; in browser console. St