3 steps to integrate Salesforce using REST API
Tags: saas, salesforce, api, tutorial
Published: 2023-01-28 17:07:12

![3 steps to integrate Salesforce using REST API](https://truto.one/blog/content/images/2023/01/salesforce_blog_hero@2x.png)

This blog will act as a reference for creating an OAuth web application for [Salesforce](https://www.salesforce.com/) to interact with the [REST API](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_list.htm). We have done the grunt work and have listed out _just_ the resources you need to integrate.

> If you looking to natively integrate with all leading CRMs such as HubSpot, Close, Pipedrive, Freshsales, and Copper, use Truto.one for free. It’s built for developers by developers to natively integrate all CRMs in one go.

> :warning: This post is not an in-depth tutorial on how to build OAuth apps in general, some prior knowledge of how OAuth apps work is required.

## Signup for a Salesforce Developer Account

Head on over to [https://developer.salesforce.com/signup](https://developer.salesforce.com/signup) to sign up for a Salesforce Developer Edition account.

![3 steps to integrate Salesforce using REST API](https://truto.one/blog/content/images/2023/01/Screenshot-2023-01-12-at-19.07.45.png)
_Salesforce Developer Edition Signup_

## Create a new Connected App

This is an OAuth app you will use to get the credentials for users and call the REST API endpoints

1. Search for "App Manager" in the search box on top of the screen.

![3 steps to integrate Salesforce using REST API](https://truto.one/blog/content/images/2023/01/Screenshot-2023-01-12-at-11.22.49.png)
_Search for App Manager_

2. Click "New Connected App" button on the top right corner of the screen

![3 steps to integrate Salesforce using REST API](https://truto.one/blog/content/images/2023/01/Screenshot-2023-01-12-at-11.24.36.png)
_Create new Connected App_

3. Punch in the basic information of the app

![3 steps to integrate Salesforce using REST API](https://truto.one/blog/content/images/2023/01/Screenshot-2023-01-12-at-12.24.21.png)
_New Connected App Basic Information_

4. In the API (Enable OAuth Settings) section, check Enable OAuth Settings. Fill in the callback URL, and make sure to select `Manage user data via APIs (api)` OAuth Scope along with other scopes required by your app. Check `Enable Client Credentials Flow` .

![3 steps to integrate Salesforce using REST API](https://truto.one/blog/content/images/2023/01/Screenshot-2023-01-12-at-12.26.16.png)
_OAuth Settings for the Connected App_

5. On the App's detail page, click Manage Consumer Details button, it will open a new tab and ask for an OTP sent to your email.

![3 steps to integrate Salesforce using REST API](https://truto.one/blog/content/images/2023/01/Screenshot-2023-01-12-at-19.20.15.png)
_Button to view Client ID and Client Secret_

6. After entering the OTP, you will see your Consumer Key (Client ID) and Consumer Secret (Client Secret) on the screen. Make a note of them.

![3 steps to integrate Salesforce using REST API](https://truto.one/blog/content/images/2023/01/Screenshot-2023-01-12-at-19.22.29.png)
_Client ID and Secret_

## OAuth flow (Generating access tokens)

Once you have the Consumer Key and Consumer Secret, the OAuth flow Salesforce follows is pretty straightforward.

You can find all the OAuth Endpoints [here](https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_endpoints.htm&type=5). Use any OAuth client of your choice to initiate the OAuth flow.

Once you have the `access_token`, you can use `Bearer` authentication with the [Salesforce REST API](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_list.htm).

* * *

Following these steps will put you on the right path to integrating Salesforce CRM.

If you have any questions or run into a roadblock, feel free to reach out to us at [support@truto.one](mailto:support@truto.one), we’ll be happy to help

Are you looking to natively integrate with all leading CRMs such as HubSpot, Close, Pipedrive, Copper, and Microsoft Dynamics Sales 365? Use [Truto.one](https://truto.one) for free. It’s built for developers by developers to natively integrate all CRMs in one go.


## Build +200 native integrations

> Using Truto's Unified API for CRM, Unified API for ATS, Unified API for HRIS, Unified API for Accounting, and 26 other categories
[Get started for free](https://truto.one/?ref=sfdevto)