PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Windev Twilio Integration
Windev Twilio Integration
Iniciado por Clive, 06,mar. 2018 14:52 - 7 respuestas
Publicado el 06,marzo 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..
Publicado el 04,septiembre 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
Miembro registrado
19 mensajes
Publicado el 14,septiembre 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
Miembro registrado
1 mensaje
Publicado el 16,septiembre 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
Publicado el 11,octubre 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
Publicado el 09,julio 2023 - 03:18
Bill wrote:
This works perfectly for me...


// check each of the 4 phone nbrs

[quote]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[/quote]


This is an old post from 2019, and now that we are in 2023, no one has taken the time to reply or express gratitude to this contributor. Therefore, I would like to seize this opportunity to thank them on behalf of many people who have surely read this post.

Thank you so much for providing the code. I want to inform you that it works perfectly with the Twilio platform for sending SMS messages. There is no need to install any APIs; it works instantly.

Once again, thank you.

Best regards,

Carlos
Publicado el 09,julio 2023 - 04:32
Mister VINCENT a écrit :
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


Good day Sir.

There is any possible way that you could post an example on how you send SMS using NEXMO, please?

Thank you

Best regards,

Carlos
Publicado el 02,agosto 2023 - 17:16
Thanks for the code, it worked correctly.

Regarts

Roberto