Windev SMS API example
Version française
//Construction du payload
vSms est un Variant
vMessage est un Variant
vMessage.sender = "Asterix"
vMessage.text = "Message via Api"
vMessage.pushtype = "alert"
vSms.message = vMessage
tabNumbers est un tableau de chaînes = ["0600000000", "0600000001"]
tabGsm est un tableau de Variants
POUR TOUT sNumber DE tabNumbers
vGsm est un Variant
vGsm.value = sNumber
tabGsm.Ajoute(vGsm)
FIN
vRecipient est un Variant
vRecipient.gsm = tabGsm
vSms.recipients = vRecipient
vPostData est un Variant
vPostData.sms = vSms
//Requete
sRequestUrl est une chaîne = "https://api.smsfactor.com/send"
sToken est une chaîne = "" //Votre token cree dans la plateforme https://my.smsfactor.com/developers/api-tokens
sHeader est une chaîne
sHeader = "Accept: application/json" + RC + "Authorization: Bearer " + sToken
SI HTTPRequête(sRequestUrl,"Windev", sHeader,VariantVersJSON(vPostData), "application/json") = Vrai ALORS
Trace("requete OK, resultat :", HTMLVersTexte(HTTPDonneRésultat())) //Imprime le resultat de notre API
SINON
Erreur(ErreurInfo())
FIN
English version
//Create a Payload
vSms is Variant
vMessage is Variant
vMessage.sender = "Asterix"
vMessage.text = "Message via Api"
vMessage.pushtype = "alert"
vSms.message = vMessage
tabNumbers is array of strings = ["0600000000", "0600000001"]
tabGsm is array of Variants
FOR EACH sNumber OF tabNumbers
vGsm is Variant
vGsm.value = sNumber
tabGsm.Add(vGsm)
END
vRecipient is Variant
vRecipient.gsm = tabGsm
vSms.recipients = vRecipient
vPostData is Variant
vPostData.sms = vSms
//Request
sRequestUrl is string = "https://api.smsfactor.com/send"
sToken is string = "" //Your token created in your platform's profile https://my.smsfactor.com/developers/api-tokens
sHeader is string
sHeader = "Accept: application/json" + CR + "Authorization: Bearer " + sToken
IF HTTPRequest(sRequestUrl,"Windev", sHeader,VariantToJSON(vPostData), "application/json") = True THEN
Trace("requete OK, resultat :", HTMLToText(HTTPGetResult())) //API return value
ELSE
Error(ErrorInfo())
END
When to use an SMS API in WinDev?
Automate your communications by integrating our WinDev-compatible SMS API. Adding SMS sending to your WinDev applications is quick and easy, allowing you to improve and simplify your communication processes.
Here are a few examples of specific uses:
- Boost security and forge unshakeable trust among your users with a Two Factor Strong Authentication (2FA) system, offering an invaluable additional layer of protection for their accounts.
- Take the customer experience to the next level with personalized SMS messages, carefully tailored to the unique interactions they have with your application.
- Deploy targeted SMS marketing campaigns to boost sales and build lasting loyalty among your customers.
- Revolutionize customer communication with our SMS automation, grabbing your customers' attention precisely when it's needed. Whether it's to relaunch an abandoned cart, welcome the creation of a new account, celebrate a purchase or announce the dispatch of a package, our programmed messages are designed to provoke an immediate reaction and minimize cart abandonment, while refining your customers' shopping experience.
Our API will allow you to increase security, boost customer engagement, and refine communication with your customers. This makes it the ultimate solution for all your SMS messaging needs.
The benefits of SMSFactor's WinDev SMS API
By opting for SMSFactor's API, you benefit from dedicated, personalized technical support. We help you integrate our API into your WinDev projects, providing practical advice and ongoing technical support.
Our SMS API for WinDev is designed to be secure and reliable, with an availability rate of 99.9%. Protecting your data is our priority, in line with RGPD standards, and we have strict measures in place against fraud and spam.
Our API's advanced features meet your varied needs:
- Use of webhooks to manage and retrieve SMS sending data.
- Simulation tools to test your configurations without disrupting end-users.
- Short links with tracking to maximize engagement and analyze the traffic generated by your messages.
- Receive SMS responses and acknowledgements for detailed tracking.
- Automated unsubscribe management to respect your recipients' preferences.