Inbound API's without using code

Inbound APIs are used when you want to expose salesforce APIs to be consumed by the third-party provider.

You can use code to write custom endpoints or you can use out of box salesforce API. This tutorial will only talk about non-code-based API development, in other words, we are going to rely on configuration instead of development.

Step 1 ) Create a new connected app. You can do this going to setup-> App Manager-> New Connected App.
 Step 2) Fill in  all mandatory fields as shown below.

Step 3) Save the settings. It might take 2 to 3 minutes for this process.
Step 4) Go to Setup- Connected App- Manage connected app and edit the app you have created just now. Set the timeout value under Session policies. 
Step 5) Go to setup - App Manager and view this newly created app to retrieve Consumer key and Customer secret. Store them somewhere at a safe place.
Step 6) Go to Profile-Settings-Reset Security Token and click on Reset security token button. You will be emailed with a security token. We need that information for our API access


Use the following URL in PostMan to generate an access token

https://login.salesforce.com/services/oauth2/token

If you are using sandbox then you need to use following URL
https://test.salesforce.com/services/oauth2/token


Use the following parameters in Postman
grant_type - Password
client_id - Consumer key
client_secret- Consumer secret
username-Username
password-Passwordsecuritytoken (password + security token you received via email)


Please make sure it is a post request. Once you click on send it will generate the access token something like this shown below


Use this access token to fetch API info
Also, use instance URL as your URL for accessing API.
For instance, to fetch the account URL will be

https://traindemodev-dev-ed.my.salesforce.com/services/data/v48.0/sobjects/Account

and use this access token under Bearer token /Oauth2

You are good to go with an inbound API part now.




Comments

Popular posts from this blog

The Salesforce Certification Frenzy: Balancing Quantity with Quality in a Changing Market