Skip to main content

Salesforce REST API

This post describe about the salesforce rest api and using salesforce rest api .


Salesforce implements the OAuth to authenticate soap and rest calls with the client. So I will describe with the simple steps, how to create salesforce app that expose outside to authenticate and call rest methods.

  • First you need to create a salesforce developer account if you don't have an developer account or sandbox account. If you don't have an developer account go with the following link and create an account. It's free.   https://developer.salesforce.com/signup.
    Once you create the developer account go to https://login.salesforce.com/ and login with your credentials.
       
  • Navigate to setup and type app and you will be able to find Apps section and click the link.
  • So now you will be able to find Connected Apps section and click New. What we doing here is creating a connected app and that app will exposing to outside to authenticate and call rest api calls.
  • So you can insert Connected App Name , API Name , Contact Email and make sure you have checked Enable OAuth Settings in API (Enable OAuth Settings). We can ignore other fields for now. Once you click the Enable OAuth Setting check box you have to fill Callback URL , that will return if the request success. So you can set https://login.salesforce.com for the Callback URL.For the Selected OAuth Scopes Give Full access(full). If you need to set the permission for the api requests you can set it here. And click Save , it will take 2- 10 minutes to make those changes take effect.
            



  • After Click Continue you will be able to see a screen same as below screen.
 

  • We have created the Connected App. So now we can make rest calls to salesforce from outside via  the connected app. Here we using Username-Password OAuth Authentication Flow to authenticate with our connected app , there for we should have grant_type , client_id , client_secret , username , password parameters with the request. I will explain each parameters and endpoint URL in next post.

Comments

Popular posts from this blog

Salesforce Metadata API

In this post I'm going the cover basics in the Metadata API and how it can connect with a .net console application. Then after I will show you how to create a custom object and create fields by using the metadata api from the console app. What is Salesforce Metadata API There are many things can be done from the metadata api. you can create Objects,Fields,Validation,Workflows, Profiles, Reports for a particular client organization just by running the piece of code so that you need not do all the customization settings manually which will consume time if you have to do that several times for different clients for the same configuration settings. You can also take the backup of your organization customization settings just by fetching the metadata WSDL from your Salesforce org. You can read, create, update, delete following components in a Salesforce organization. Custom Objects/Fields. Visualforce pages. Page Layouts. Validation rules. Apex. Workflows. Approval processe

Exploring the Marvels of Salesforce Marketing Cloud: Unleashing the Power of Marketing Automations

Salesforce Marketing Cloud is a comprehensive marketing automation platform offered by Salesforce, a leading customer relationship management (CRM) company. It is designed to help businesses manage and optimize their marketing efforts across various channels and touchpoints. The platform enables organizations to create, execute, and analyze marketing campaigns to engage with their target audiences more effectively and drive better results. Key features and capabilities of Salesforce Marketing Cloud include: Email Marketing: Users can create and send personalized email campaigns to segmented audiences, track email performance metrics, and automate email workflows to nurture leads and build customer relationships. Journey Builder: This tool allows marketers to design and automate customer journeys across multiple channels such as email, mobile, social media, and advertising. It helps create personalized experiences based on customer behavior and interactions. Social Media Marketing: Sale