'How do I add user input in Plivo's SMS API?
I am using Plivo's SMS API to send SMS messages. Is it possible to have an user input prompt for “SENDERS NAME”, “RECEIVER NAME” and “MESSAGE” in Plivo’s SMS API without having them to be hardcoded before I run the .js file?
var plivo = require('plivo');
(function main() {
'use strict';
var client = new plivo.Client("<MY API KEY>", "<MY API TOKEN>");
client.messages.create(
"+1<SENDER NUMBER>", // Sender's phone number with country code
"+1<RECEIVER NUMBER>", // Receiver's phone Number with country code
"<MESSAGE>", // Message
{
method: "GET", // Method used to trigger message URL.
url: "http://example.com/sms_status/" // The URL to which with the status of the message is sent
},
).then(function(response) {
console.log(response);
}, );
})();
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
