Twilio node extra parameters

强颜欢笑 提交于 2019-12-25 06:56:23

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!