Salesforce Rest API 查询数据

本文介绍了如何利用Salesforce Rest API查询数据,重点提及了获取access token的过程,包括需要的client id、client secret,以及如何结合username、password和security token进行验证。此外,还提到了使用SQL语句进行数据查询的通用方法。
摘要由CSDN通过智能技术生成

 

官方文档:

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/using_resources_working_with_records.htm

 

如何生成access token? 其中client id 和 client secret可以在connected app里找到,username和password为Salesforce里一个user的用户名和 密码 + security token

import requests as req
import json
 
testTokenUrl = "https://test.salesforce.com/services/oauth2/token"
testReqJson = {
    "client_id": "xxx",
    "client_secret": "xxx",
    "username": "sandbox_dev",
    "password": "password+securityToken",
    "grant_type": "password"
}
 
header = {
    "Content-Type": "application/x-www-form-urlencoded",
}
 
response = req.post(testTokenUrl, data=test
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值