Connected App is provided by the salesforce to connect with the platform from any other application.
Getting Started With Salesforce Connected App:
- In salesforce, Go to Quick Search bar and then search for App manager and then click on New Connected App Button.
- Now Fill the Connected App Name, API name And Contact.
- Select Enable OAuth Settings.
- Provide Call Back Url.
- Select Access and manage your data (API)‘ in Available OAuth Scopes.
- Click the save button and then continue.
- Now you will get the consumer key and consumer secret, these two are required for Authentication.
Postman is an application that is used for calling APIs of any platform (Like Salesforce, Dot Net, PHP etc.) and can verify these APIs if are working properly or not.
Getting Started with Postman:
- Download and install the Postman.
- Now we have to give the URL and 5 required parameters to get the Access Token of Salesforce Org.
- URL: https://login.salesforce.com/services/oauth2/token?
- Select Body and then form-data and give the parameter:
Key:-Username, Value:- org Username.
Key:Password, Value:- org Password.
Key:grant_type, Value:- Password
Key:Client_id, Value:- Consumer Key
Key:Client_secret, Value:- Consumer Secret
- Select Post Method and click on send button.
- Now you will get instance_url, Access token and Token type.
Retrieving data from Salesforce:
- Give the URL.
instanceUrl:-In this, we have to give the instance Url we got from the token API in the last step.
Objectname: Provide the name of the object in this parameter.
ID: Id of the record we are trying to fetch.
- Select Get Method.
- Provide the access token in the header section.
- Click on the send button in response and you will get the details of the record.
Creating a record in Salesforce:
- Give the URL.
Sample URL: https://instanceurl/services/data/v25.0/sobjects/Objectname
instanceUrl:- In this, we have to give the instance URL we got from the token API.
Objectname: In this, provide the name of the object we are trying to create a record.
- Select Post method to create the record.
- In the Header Section, provide the Access Token.
- Select body section and then select ROW and then provide the record details in XML or Json format.
- Click on the send button.
- Go to salesforce, you will find the new record which you have created from postman.
If you have skills in PHP programming and you want to enhance your career in this field, a PHP certification from StudySection can help you reach your desired goals. Both beginner level and expert level PHP Certification Exams are offered by StudySection along with other programming certification exams.