Salesforce Shots: Access Salesforce Data Outside Salesforce using API

Perigeon Software
3 min readJul 13, 2022

Whenever we need to access salesforce data outside of salesforce, firstly we need to create a connected app inside our Salesforce org, it will give the credentials like client Id, and client secret which we will use to generate access token as parameters. In our scenario, we are using Postman where we can access the data which is inside the salesforce org as well as we can create, edit, delete, etc records inside the salesforce org without login into our org. To achieve this functionality, please follow the below considerations:

  • Create a connected app inside our Salesforce org, which orgs data we want to access. Please refer to the below screenshot to create a connected app.
  • After creating the connected app, we must click on the “Manage Connected App Details” button for Client id & Client secret.
  • Now we have the client id and client secret so, we pass it as a parameter into the Postman app/web along with username, password, grant type, and corresponding values using POST method and along with salesforce login URL https://login.salesforce.com/services/oauth2/token.
  • After performing the above steps, we will get an access token along with other credentials like instance URL, Signature, etc. To access the data of salesforce like a record of sObject we need to use previously gotten instance URL and append services, data, v55.0(API version), sObject then name of the desired sObject, Like https://instance_url/services/data/v55.0/sobjects/Account(sObject Name). After that, we must use that token in the header as authorization and the token come with the Bearer keyword as value, for detail please refer to below screenshot.
  • If we want to create, update, or delete a record from Postman and it should be done inside the connected salesforce org then we must write the required field’s name along with its value in different formats like JSON, etc. One thing to be noticed here apart from creating a record we need to append the record id in the URL to successfully perform an update, delete, etc.. operations. For these operations, we will have methods like GET, POST, PATCH.

Perigeon Software is a software development firm. With a fresh perspective and dedicated attention to each client, we provide a complete IT solution globally. By defining, designing, and developing solutions tailored to meet our clients’ business objectives, we ensure that our clients get the maximum return on their investment and support them in tackling evolving business and technological issues. Our mission is to provide the best customer service and expertise using the most practical and robust web technologies/software technologies to satisfy our clients’ IT objectives and to provide them with the business and competitive advantage they needed to succeed.

To learn more about Perigeon’s portfolio, visit: https://www.perigeon.com/portfolio/

To learn more about Perigeon’s Salesforce capabilities, visit: https://www.perigeon.com/salesforce/

Drop us a mail at possibilities@perigeon.com to discuss your salesforce requirement.

Originally published at https://www.perigeon.com on July 13, 2022.

--

--

Perigeon Software

We deliver customized global IT solutions using cutting-edge technology with expertise in Salesforce, Shopify, BigCommerce Data and AI.