课程: Twilio Essentials Unit 1: Introducing Twilio and Programmable Messaging

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Dynamic messaging

Dynamic messaging

- You're doing great. Now, you cannot only send one-way messages, but you just got two-way messaging working, inbound and outbound. Your number responds when it receives an incoming text message, but the thing is, it always responds the same way. Now, for some use cases, this is okay. I suppose you could build an affirmation hotline. Like, no matter what someone texts in, it comes back with the three best words ever. You always need to hear that no matter what. But for most uses, you'll probably want to make it more dynamic. When your Twilio number receives an incoming message, Twilio will pass control to you, so that you can handle it appropriately. It passes the information to you by performing an HTTP post request to a URL that you specified. The info will be delivered to you, URL form encoded. So, any web framework that you're running will be able to access it. Now, handling it should feel as familiar as handling…

内容