What Request URL for Voice in TwiML App setup should I use when I develop on localhost?

大憨熊 提交于 2019-12-10 17:49:14

问题


I am creating an app in ASP.NET-MVC where I can call phone number from browser.

To do that I need to create capability token like in the sample:

 var capability = new TwilioCapability(accountSid, authToken);
    capability.AllowClientOutgoing(appSid);
    capability.AllowClientIncoming("jenny");
    string token = capability.GenerateToken();

The appSid is an identifier of TwimlApp created on my Twilio account as described here: https://www.twilio.com/help/faq/twilio-client/how-do-i-create-a-twiml-app

I have absolutely no idea what should I put in the Request URL in Voice section. I develop on locally on my computer. ASP.NET-MVC app is run on localhost.

Sample image from Twilio's website:


回答1:


Developing with a web service like Twilio can be difficult when it needs to make requests from a server to your development environment. One of the best tools I've found to make this easy is called ngrok.

ngrok allows you to create tunnels to your machine and give them a friendly name with a custom port.

For example, you could setup ngrok locally on your machine to forward all requests from twilio to yoda.ngrok.com to your environment. This makes it really easy to develop locally with web hooks. Let me know if you have any questions on getting setup!



来源:https://stackoverflow.com/questions/30382545/what-request-url-for-voice-in-twiml-app-setup-should-i-use-when-i-develop-on-loc

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