Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 2 Jahren, 4 Monaten
Letzter Beitrag:
vor 2 Jahren, 4 Monaten
Beteiligte Autoren:
Paul Murray, Fabrice Harari

[WD20] TWILIO --- HTTP, WEB SERVICE, REST or ALL THREE?

Startbeitrag von Paul Murray am 07.02.2016 00:24

Greetings all,

We use Twilio to send out SMS messages and we have a call back URL that Twilio connects to on our server to tell us if the message was delivered and also to handle SMS replies from our clients.

I realized today that one of our vendors is sending out SMS messages via Twilio and did not implement a call back url for the status and replies. So the responses are getting dropped on the floor.

I was hoping to create a simple web service in WinDev 20 to get this done. From the documentation it seems like Twilio does a simple Post to whatever URL I give them and then I have to parse out the data. In version 1.0 of this, I am simply going to lookup a reference number and then email it (along with the reply) to a group email.

So I am curious as to where I would start with this. Do I create a web service project? Is there a way to specify that the web service will be .NET, XML, JSON, REST?

For now, I would simply like to set up a simple web service to take the data posted and email it to myself.

Any pointers would be appreciated...

Thank you!!

Confused in NJ...

Paul

http://blog.webscript.io/simple-twilio-applications.html

https://www.twilio.com/docs/api/twiml/sms/twilio_request
[attachment 1862 TwilioCallBackURLConfigurationforTwilioPhoneNumber.png]

Antworten:

Hi Paul

the easiest way to do that is to create one awp page in webdev. It will be in effect a REST type webservice. Use the pageparameter function in the page init code to get the value of the parameters sent by twilio (there is a different syntax to use depending if they arrive in post mode or get mode)

After that, the code of your page is whatever you want (sending emails is of course easy). There is an example of all that in wxReplication/WXEDM, as I'm using the same system for the communication part of the replication

Best regards

von Fabrice Harari - am 07.02.2016 11:31
Thank you, Fabrice.

Fortunately, I have WebDev 19 and I have been working with it for the past couple of hours.

I install the WebDev Application Server on one of my servers, but for the life of me cannot get WebDev 19 to connect via FTP.

Paul

von Paul Murray - am 08.02.2016 00:08
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.