我想在SMS事件中传递一个信息,当我使用该信息获得该事件时,我可以简单地将值存储在该特定ID文档中。谁能告诉我如何在SMS网络挂钩中传递额外的信息?
require("dotenv").config();
const aws = require('aws-sdk');
aws.config = new aws.Config();
aws.config.accessKeyId = process.env.AWS_ACCESS_KEY_ID;
aws.config.secretAccessKey = process.env.AWS_SECRET_KEY;
aws.config.region = "us-east-1";
var sns = new aws.SNS();
function sendSMS(to_number, message, cb) {
sns.publish(
{
Message: message,
Subject: "Owner Campaign",
PhoneNumber: to_number,
MessageAttributes:{
'SenderID': {
DataType: "String",
StringValue: "GF-NOTICE",
}
}
},
cb
);
}
const PhoneNumberArray = ["+91223555655"];
PhoneNumberArray.forEach((number) => {
sendSMS(
number,
"Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
(err, result) => {
console.log("RESULTS: ", err, result);
}
);
});
我想在SMS网络挂钩中传递广告系列,我将像这样添加广告系列:'abcded'