REST API를 활용해 Postman-SF 연동정리

HEP·2023년 2월 27일
0

How to Connect Salesforce and Postman using REST API

  1. In Salesforce, navigate to Setup→Build→Create→Apps
  2. Then go to Connected Apps for creation.
  3. Now choose the New Button to create a new connected app.
  4. Enter all the required information for the application.
  5. Select Enable OAuth Settings.
  6. Now provide a Callback URL and choose ‘Access and manage your data(api)‘ in Selected OAuth Scopes.
  7. Click on Save and Continue.
  8. Click on your connected app.
  9. Now, make a note of consumer key and consumer secret as these are required to authenticate.
  10. 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 가 붙은 메서드 실행

profile
셀포합니다

0개의 댓글