我正在使用在 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/