PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 27 → Windev Twilio Integration
Windev Twilio Integration
Débuté par Clive, 06 mar. 2018 14:52 - 4 réponses
Posté le 06 mars 2018 - 14:52
I apologise if this topic has been covered.

Is it possible to integrate the SMS send and receive functionality from Twilio into my Windev V21 application. If so is there some sample code to get me started? or if somebody who has done it could give me step by step of what I should to do get it working.

Many thanks in advance..
Posté le 04 septembre 2019 - 19:48
Hello i have thé same problème do yo have once solution about intégration twilio code on windev for send SMS
Membre enregistré
19 messages
Posté le 14 septembre 2019 - 17:47
This is a good question. While I have tried to do this in Twilio, I couldn't. With the help of a WinDev expert, I was able to get SMS working in my WINDEV app using NEXMO.

But if someone has an idea of doing the same with Twilio, please ....

--
Vincent D Crosby
Membre enregistré
1 message
Posté le 16 septembre 2019 - 22:36
This works perfectly for me...


// check each of the 4 phone nbrs

FOR n = 1 TO 4
// Check if any phones marked to accept text msg
sPhone = {"stFamily:sPhone"+n,indVariable}
IF sPhone <> "" THEN
IF gaaPhones[sPhone]..Occurrence = 0 THEN
stLocalPhone:ID = TABLE_Students.COL_ID
sPhone = Replace(sPhone,"-","") // remove dashes
stLocalPhone:sPhone = sPhone
stLocalPhone:sFirstName = TABLE_Students.COL_FirstName
stLocalPhone:sClassTime = TABLE_Students.COL_ClassTime
gaaPhones[stLocalPhone:sPhone] = stLocalPhone
END
END
END


stLocalPhone is STPhones

sAccountSid is string = "YourAccountSIDNbr"
sAuthToken is string = "YourAuthToken"
sFrom is string = "+12223334444" // your twilio phone nbr

SMSURL is string = "https://api.twilio.com/2010-04-01/Accounts/" + sAccountSid + "/Messages"

FOR EACH stLocalPhone OF gaaPhones // Send text messages
gnTextCount ++

HTTPCreateForm("SMS")
HTTPAddParameter("SMS","From",sFrom)
HTTPAddParameter("SMS","To", stLocalPhone:sPhone)
HTTPAddParameter("SMS","Body",sMsg)
IF HTTPSendForm("SMS",SMSURL ,httpPost,"","","",sAccountSid,sAuthToken) = False THEN
Trace(ErrorInfo())
END

End
Posté le 11 octobre 2022 - 08:13
SMS functions of Language allow you to send and receive SMS messages easily with WINDEV Mobile.

A text message (up to 160 characters) sent to a cell phone is called an SMS (Short Message Service).

Regards
David
https://smsala.com