当前位置: 代码迷 >> 综合 >> Salesforce 自定义Rest接口并在Postman测试
  详细解决方案

Salesforce 自定义Rest接口并在Postman测试

热度:38   发布时间:2023-12-19 02:00:14.0
  • 自定义接口:

    https://trailhead.salesforce.com/en/modules/apex_integration_services/units/apex_integration_webservices

  • POSTMAN测试

    http://amitsalesforce.blogspot.com/2017/06/test-salesforce-api-by-postman-rest.html

防止页面被墙,copy部分内容

获取token:
先建立connect app,postman访问以下连接:

https://na50.salesforce.com/services/oauth2/token?grant_type=password&client_id=Consumer Key_Here&client_secret=Consumer Secret_Here&username=*&password=**password+securityToken*

官网方法2获取accessToken:

https://developer.salesforce.com/docs/atlas.en-us.mc-getting-started.meta/mc-getting-started/get-access-token.htm
这里写图片描述

POSTMAN Oauth2认证:

https://blog.mkorman.uk/using-postman-to-explore-salesforce-restful-web-services/

如果是Sandbox使用 https://test.salesforce.com/services/oauth2/token

https://developer.salesforce.com/forums/?id=9060G000000XecLQAS