我正在尝试使用JSForce连接到 Salesforce SOAP API
const connection = new jsforce.Connection({
loginUrl: "https://customdomain.my.salesforce.com",
});
await connection.login(username, password);
当我运行它时,我收到以下错误
Error: INVALID_LOGIN: Invalid username, password, security token; or user locked out.
at /Users/juancaicedo/code/calm/salesforce-poc/node_modules/jsforce/lib/connection.js:1552:13
at tryCallOne (/Users/juancaicedo/code/calm/salesforce-poc/node_modules/promise/lib/core.js:37:12)
at /Users/juancaicedo/code/calm/salesforce-poc/node_modules/promise/lib/core.js:123:15
at flush (/Users/juancaicedo/code/calm/salesforce-poc/node_modules/asap/raw.js:50:29)
at processTicksAndRejections (internal/process/task_queues.js:75:11)
(Use `node --trace-warnings ...` to show where the warning was created)
这是一种很好的身份验证方式,还是我应该做其他事情?我在其他地方看到过提到安全令牌,这是首选吗?
笔记
我可以使用这些凭据成功登录 Salesforce UI ✅</p>
我愿意使用另一个 Node.js 库,但确实需要使用 SOAP API(使用 REST API 是不够的)。