javascript - 使用 Node 的 SendPulse API 进行身份验证凭据

标签 javascript node.js email smtp

我正在使用在 smtp Node 中编写的 SendPulse 客户端库。这是他们的 example.js 的片段:

var API_USER_ID="USER_ID"
var API_SECRET="USER_SECRET"

var TOKEN_STORAGE="/tmp/"

sendpulse.init(API_USER_ID,API_SECRET,TOKEN_STORAGE);

我尝试使用我创建帐户时使用的电子邮件地址以及他们在 SMTP 设置页面上为我提供的密码,分别作为 user_id 和 user_secret。当我运行代码时,我收到以下错误消息:

{ error: 'invalid_request', error_description: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.', message: 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.', error_code: 1 }

但是,似乎无论您做什么,您总会收到该错误消息。您可以运行 sendpulse.ini(); 并仍然收到该消息。

我的问题是,使用 SendPulse Node 库的正确凭据是什么? smtp 设置页面还为我提供了一个公钥,但不知道如何处理它。我注意到这个库已经有一年了,它已经过时了吗?非常感谢您的帮助。我正处于一个非常大的项目的结尾,这是最后的障碍。

最佳答案

您需要使用https://login.sendpulse.com/settings/中的“ID”和“ secret ”页面,转到“API”选项卡并启用“激活 REST API”。

关于javascript - 使用 Node 的 SendPulse API 进行身份验证凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37581481/

相关文章:

javascript - 在 angularJS 中使用 JSON 显示文件系统结构

javascript - JS选择器结合jquery

javascript - 使用 RaphaelJS 将路径缩放到纸张大小或以像素为单位设置路径尺寸

javascript - dc.js:如何从减少的子箱中计算平均值?

node.js - 如何使用 NODE_OPTIONS 环境变量在 Windows 中全局设置 max_old_space_size?

javascript - 无法在 Protractor 中检索电子邮件信息

python - 从移动设备发送的电子邮件被奇怪地使用电子邮件库解码

javascript - 绑定(bind)超出范围的变量可以加速您的代码吗?

node.js - 如何使用无服务器框架引用不在根文件夹中的函数?

c++ - 使用 unix sendmail 发送电子邮件