问题
I am making a call using twilio nodejs wrapper as below:
client.makeCall({
to:'+1234567890',
from: '+12345678',
Method: "GET",
url:'http://www.example.com/twilio-xml'
}, function(err, responseData) {
if (err) {
console.log(err);
} else {
console.log(responseData.from);
console.log(responseData.body);
}
});
I would need to pass my custom parameters to http://www.example.com/twilio-xml
request so that response twiml can be generated according to that. How can that be achieved? Thanks in advance.
回答1:
Twilio evangelist here.
The easiest way to send extra parameters is to append them to the URL as querystring values:
url:'http://www.example.com/twilio-xml?foo=bar'
Hope that helps.
来源:https://stackoverflow.com/questions/26825829/twilio-node-extra-parameters