Node.js SendInBlue-sib-api-v3-sdk sendtranacemail()返回403禁止

Node.js SendInBlue-sib-api-v3-sdk sendtranacemail()返回403禁止,node.js,email,sendinblue,Node.js,Email,Sendinblue,我试图用我的新SendInBlue帐户发送一封事务性电子邮件,但我一直收到一个简单的错误,上面写着“禁止”。我按照SendInBlue的Nodejs文档中的示例编写了以下代码: const SibApiV3Sdk = require('sib-api-v3-sdk'); const defaultClient = SibApiV3Sdk.ApiClient.instance; // Configure API key authorization: api-key const apiKey =

我试图用我的新SendInBlue帐户发送一封事务性电子邮件,但我一直收到一个简单的错误,上面写着“禁止”。我按照SendInBlue的Nodejs文档中的示例编写了以下代码:

const SibApiV3Sdk = require('sib-api-v3-sdk');

const defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
const apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'xxx';
// Uncomment the following line to set a prefix for the API key, e.g. 'Token' (defaults to null)
//apiKey.apiKeyPrefix = 'Token'

// Configure API key authorization: partner-key
//const partnerKey = defaultClient.authentications['partner-key'];
//partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. 'Token' (defaults to null)
//partnerKey.apiKeyPrefix['partner-key'] = 'Token'

const apiInstance = new SibApiV3Sdk.TransactionalEmailsApi();

const sendSmtpEmail = new SibApiV3Sdk.SendSmtpEmail(); // SendSmtpEmail | Values to send a transactional email

const sendEmail = async (to, subject, htmlBody, textBody) => {

    sendSmtpEmail.to = [{ email: to }];
    sendSmtpEmail.sender = { email: 'voluntime.aryanm@gmail.com', name: 'Voluntime' };
    sendSmtpEmail.htmlContent = `<html><body style='text-align:center'><strong>Voluntime</strong><br><br><p style='width:90%;padding-left:5%;padding-right:5%'>${htmlBody}</p><br><br>You can update your email preferences for <a href='https://voluntime.mittaldev.com'>Voluntime</a> in the Account page.<br><span style='opacity:0'>${Date.now()}</span></body></html>`;
    sendSmtpEmail.textContent = `Voluntime:\n\n${textBody}\n\nYou can update your email preferences for Voluntime in the Account page.\n\nTimestamp: ${Date.now()}`;
    sendSmtpEmail.subject = `Voluntime - ${subject}`;
    sendSmtpEmail.replyTo = { email: 'voluntime.aryanm@gmail.com' };

    const result = await apiInstance.sendTransacEmail(sendSmtpEmail);
    console.log(result);
    return result;
};


export { sendEmail };
const SibApiV3Sdk=require('sib-api-v3-sdk');
const defaultClient=SibApiV3Sdk.ApiClient.instance;
//配置API密钥授权:API密钥
const apiKey=defaultClient.authentications['api-key'];
apiKey.apiKey='xxx';
//取消对以下行的注释以设置API键的前缀,例如“Token”(默认为null)
//apiKey.apiKeyPrefix='Token'
//配置API密钥授权:合作伙伴密钥
//const partnerKey=defaultClient.authentications['partner-key'];
//partnerKey.apiKey='您的API密钥';
//取消对以下行的注释以设置API键的前缀,例如“Token”(默认为null)
//partnerKey.apiKeyPrefix['partner-key']='Token'
const apicance=new SibApiV3Sdk.TransactionalEmailsApi();
const sendSmtpEmail=new SibApiV3Sdk.sendSmtpEmail();//SendSmtpEmail |发送事务性电子邮件的值
const sendmail=async(to、subject、htmlBody、textBody)=>{
sendsmtpeail.to=[{email:to}];
sendSmtpEmail.sender={email:'voluntime。aryanm@gmail.com,名称:'Voluntime'};
sendsmtpmail.htmlContent=`Voluntime

${htmlBody}



您可以在帐户页面中更新您的电子邮件首选项。
${Date now()`; sendSmtpEmail.textContent=`Voluntime:\n\n${textBody}\n\n您可以在帐户页中更新Voluntime的电子邮件首选项。\n\nTimestamp:${Date.now()}`; sendsmtpeil.subject=`Voluntime-${subject}`; sendSmtpEmail.replyTo={email:'voluntime。aryanm@gmail.com' }; const result=wait apinstance.sendTransacEmail(sendSmtpEmail); 控制台日志(结果); 返回结果; }; 导出{sendmail};
apInstance.sendTransacEmail(sendSmtpEmail)行抛出一个403错误,简单地说是“禁止”。我该如何解决这个问题