Skip to content
Accueil » API SMS Octopush » Code source API SMS VB

Code source API SMS VB

Fichier de configuration

Public Class configFile
Public user_login As String = « ************@******** »
Public api_key As String = « **************** »
Public sms_text As String = « test text »
Public sms_recipients() As String = {« +33600000000 »}
Public sms_type As String = SMS_TYPE_QUALITE_STANDARD
Public sms_mode As String = 1
Public sms_sender As String = « Octopush »
End Class 

Fichier Main

Imports System.Xml
Module campagne
Sub Main()
Dim config As configFile = New configFile()
Dim sms As SMS = New SMS()
sms.set_user_login(config.user_login)
sms.set_api_key(config.api_key)
sms.set_sms_mode(config.sms_mode)
sms.set_sms_text(config.sms_text)
sms.set_sms_recipients(config.sms_recipients)
sms.set_sms_type(config.sms_type)
sms.set_sms_sender(config.sms_sender)
Dim xml As String = sms.send(config.DOMAIN, config.PATH_SMS, config.PORT)
Dim xmlDoc As New XmlDocument
Dim productNodes As XmlNodeList
xmlDoc.LoadXml(xml)
End Sub
End Module

Objet Principal