How to create Connected App in Salesforce and get access Token?

 The Connected App is created to make authenticated calls to REST API in salesforce to perform CRUD (Create, Read, Update and Delete ) operations on records in Salesforce. To create a connected app follow the steps below :

  1. Go to App Manager in Setup and click on New Connected App

2. Fill out all the details as shown below with valid mail Id. In callback URL, you can enter any URL where you want to redirect after successful result. OAuth Scope has been provided as Full Access. You can modify it according to your requirement. Then save it.

3. Then on the Connected App record that we have created, click on Manage > Edit Policies > Permitted Users. Set it to All users may self-authorize. Also if you have got some IP ranges set in your org, you can set IP Restriction to Relax IP restriction.

4. Then in Setup go to My Domain and note down the domain name.

5. Then we will go back to Connected App record that we had created and note down the client_id and client_secret from there which will be obtained by clicking on Manage Consumer Details.

6. Now open Postman and use the url :

https://{custom_Domain_Name}/services/oauth2/token?

and in Params enter the data as shown below :

where in client_id and client_secret will be the ones noted down earlier. Then enter your username and password. The method here should be POST.

7. After completing all this, just click on Send and you’ll receive the token as shown below.

Comments

Popular posts from this blog

Update Custom Fonts in Salesforce Experience/Community Site

Error Logging Framework in Salesforce