码迷,mamicode.com
首页 > 其他好文 > 详细

ARC测试Salesforce Interface class

时间:2018-01-08 21:07:11      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:oauth   post   ons   gpo   ack   app   rect   iss   sig   

  • Step1.

  通过Request获取accessToken。

  HttpMethod:POST

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

  Parameters:

1 content-type:application/x-www-form-urlencoded
2 grant_type:password
3 client_id:app_client_id
4 client_secret:app_client_secret
5 username:username
6 password:password+Security Token
7 redirect_uri:https://localhost/oauth_callback.php

    Response

1 {
2 "access_token": "access_token",
3 "instance_url": "https://instance.salesforce.com",
4 "id": "orgId",
5 "token_type": "Bearer",
6 "issued_at": "issued_at", 
7 "signature": ""
8 }
  • Step2.

    复制access_token,构造request如下

"Url":"https://instance.salesforce.com/services/apexrest/interfacepath"
"Method":"HttpMethod"
"content-type":application/json
"authorization":"Bearer access_token"

 

ARC测试Salesforce Interface class

标签:oauth   post   ons   gpo   ack   app   rect   iss   sig   

原文地址:https://www.cnblogs.com/resetsuna/p/8244676.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!