TwiML Bin - Anyway to access parameters?

夙愿已清 提交于 2019-12-06 04:57:29
Marcos Placona

Twilio developer evangelist here. Unfortunately, to get the value from the <Gather>, you will need a backend server as Twilio will make and HTTP POST or GET request to your page with that digit.

Luckily doing that is pretty simple, and you could put something in place fairly quickly by just deploying it to one of your servers, or even a free Heroku instance.

From your question, I can't quite tell what programming language you're using, but if you wanted to do this in say PHP, you could do something like this:

<?php
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<Response><Say>You entered " . $_REQUEST['Digits'] . "</Say></Response>";
?>

Another way you could do this is by using the twimlets website.

Have a look at this example. You could then create your logic with TwiMLBin to redirect the user.

Hope this helps you out.

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