Exemple VBA

Voici un exemple de code VBA simple qui vous permet d'envoyer un message unitaire.

        
Sub SEND()
			Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
			Dim Recipient As String
			Dim Message As String
			'Set vars where phone numbers and msg are set in your sheet'
			Recipient = Range("A5").Value
			Message = Range("B5").Value
			Url = "https://api.smsfactor.com/send?text=" + Message + "&to=" + Recipient
			objHTTP.Open "GET", Url, False
			objHTTP.setRequestHeader "Authorization", "Bearer YOUR_API_TOKEN" 'Your Token'
			objHTTP.setRequestHeader "Accept", "application/json"
			objHTTP.SEND ("")
		End Sub