我一直在关注以下教程:http://wiki.developerforce.com/page/Accessing_Salesforce_Data_From_Ruby
但是,我坚持你需要提供密钥的部分:
host: login.salesforce.com # Use test.salesforce.com for sandbox
client_secret: 1234567890 # This is the Consumer Secret from Salesforce
client_id: somebigidthinghere # This is the Consumer Key from Salesforce
sobject_module: SFDC_Models # See below for details on using modules
debugging: true # Can be useful while developing
username: me@mycompany.com
password: mypasswordplusmysecuritytoken
Run Code Online (Sandbox Code Playgroud)
我在哪里可以得到client_secret和client_id.来自Salesforce官方API站点的教程有点过时了.http://www.salesforce.com/us/developer/docs/api_rest/index.htm
而其他一些教程甚至没有提到从哪里获得它.
我已经在http://developer.force.com/创建了一个帐户
甚至创建了一个自定义应用程序,如果我错了,请纠正我.
然后不知道在哪里找到我需要的钥匙.
任何变通办法将不胜感激.
最近,我通过databasedotcom gem将Salesforce API集成到了我的Rails 3.2应用程序中。
另外,还有一个后台作业用于数据同步。
登录我的专业版Salesforce帐户后,Resque作业失败,并显示此错误...
Class
Jobs::Salesforce::Contact
Arguments
1
Exception
Databasedotcom::SalesForceError
Error
The REST API is not enabled for this Organization.
Run Code Online (Sandbox Code Playgroud)
即使是专业版,我也将如何启用API?
我尝试使用Developer Edition,但没有问题。
在Salesforce中是否有允许使用REST API的特定版本?
专业版的试用版怎么样?
谢谢。祝你有美好的一天!
我正在尝试采用databasedotcom gem,但无法超越身份验证.这是我做的(安装databasedotcom gem之后):
所有凭据都在此过程中进行了复制和粘贴,因此没有错误; 证书已在此处下载:http://certifie.com/ca-bundle/ca-bundle.crt.txt
我反复尝试过Ruby 187和193以及Rails内部和外部,但总是收到此错误消息:
Databasedotcom :: SalesForceError:来自/Library/Ruby/Gems/1.8/gems/databasedotcom-1.3.0/lib/databasedotcom/client.rb:112:in"authenticate"的身份验证失败
我想知道我错过了什么?特别是,我担心在Salesforce中创建远程访问时使用的回调URL(我试过'oob','http:// localhost:3000'和'https://www.salesforce.com',但没有有所不同).
我目前正在尝试通过Ruby和databasedotcom-gem访问salesforce.com数据库.我在这里阅读了自述文件:https://github.com/heroku/databasedotcom
我能够连接到数据库并访问联系人,并找到该联系人的电子邮件.所以连接正常.但是,当我跑:
contact.update_attributes "Name" => "New Name"
Run Code Online (Sandbox Code Playgroud)
我收到以下错误
ensure_expected_response':无法创建/更新字段:名称.请检查此字段的安全性?>设置,并验证它是否为您的配置文件或权限集读/写.(Databasedotcom :: SalesForceError)
好像我已经阅读但没有对salesforce db的写访问权限.这是我如何使用oauth的问题(我的理解是非常基本的)?或者它可能只是salesforce.com上的设置更改?
如何使用databasedotcom gem通过批量api在单个api调用中添加多个记录?现在我使用普通的activerecord类型方法插入每个记录需要一个api调用