Access to Salesforce API

This guide will tell you how to use Salesforce API from an external website or service. The first method is suitable when you only need to make API calls, the second method is suitable if you also want to use Salesforce as a identity/authentication provider for your website, which might require a bit further customization.

Setup authentication documentation

Getting authentication token

After logging into salesforce, at the top right corner, go to:




Salesforce Objects and fields

Note: In the database language, salesforce objects refer to tables/entity sets and fields refer to the attributes of the table/entity set.

After logging into salesforce, at the top right corner, go to:


Querying data from Salesforce

After logging into salesforce, at the top right corner, go to Developer console to test queries in the query editor.
The query editor uses SOQL - Salesforce Object Query Language

Setting up a Connected App in Salesforce to enable social login

Why would you want to use Salesforce as an authentication provider?

Set up

Screen Shot 2023-11-18 at 9 10 40 AM

Screen Shot 2023-11-18 at 9 06 36 AM

After creating the Connected App, navigate to your app in Manage Connected Apps like shown before. You will see an option to get Consumer Key and Secret, which you can inject into your project. Now users can log into your application with their Salesforce credentials, and you can also use API calls to Salesforce by sending the access token you receive from Salesforce after successful user login in the header of the API request.

Image References: