How to Connect Salesforce and Postman using REST API
- In Salesforce, navigate to Setup→Build→Create→Apps
- Then go to Connected Apps for creation.
- Now choose the New Button to create a new connected app.
- Enter all the required information for the application.
- Select Enable OAuth Settings.
- Now provide a Callback URL and choose ‘Access and manage your data(api)‘ in Selected OAuth Scopes.
- Click on Save and Continue.
- Click on your connected app.
- Now, make a note of consumer key and consumer secret as these are required to authenticate.
- In order to get a consumer secret, click on Reveal.
참고 :
https://www.appseconnect.com/how-to-connect-salesforce-and-postman-using-rest-api/
How to get Access Token
https://login.salesforce.com/services/oauth2/token?grant_type=password&client_id=_YourConsumerKey_&client_secret=_YourConsumerSecret_&username=_SalesforceUserName_&password=_SalesforcePassword_
- Authentication is used for getting access token and instance URL. In order to get access token, we have to set up the HTTP login request URL.
- In the login URL, Client_id, Client_secret, Username, Password, Grant_type are the required fields. The structure of Url is shown below:
- Use the ‘POST’ method for the login URL.
- Provide the URL below to login and click on Save.
Integrating Salesforce using Postman
https://_instanceurl_/services/apexrest/_urlMapping_
Header Parameter
Authorization : Bearer AccessToken
Content-Type : application/json
1) @RestResource(UrlMapping='/urlMappingName/*')
UrlMapping이 같은 클래스로 이동
2) @HttpPost 가 붙은 메서드 실행