Option Compare Database
Public Function sendSMS(strTarget As String, strText As String) As Boolean
Const RoutineName = "sendSMS"
Dim strPostURL As String
strPostURL = "=https://rest.nexmo.com/sms/json?api_key=ttt&api_secret=uuu&from=vvvto=xxx&text=estamos fritos e cozidos e comidos"
Dim arrResponse
On Error GoTo Error_Handler
' Default to false in case anything goes wrong.
sendSMS = False
' We use xmlHTTP to submit the input values and record the response
Dim objRequest As New MSXML2.XMLHTTP
objRequest.Open "GET", strPostURL, False
objRequest.Send
' The response string is broken into an array using the specified delimiting character
arrResponse = Split(objRequest.responseText, "|", -1)
sendSMS = True
Exit_Handler:
On Error Resume Next
Set objRequest = Nothing
Exit Function
Error_Handler:
MsgBox Err.Description, _
"ERROR " & Err.Number
Resume Exit_Handler
End Function
The above example shows an example of talking to Mapquest to get a geocode for an address. You set a reference to the XLM lib, and it has the functions you can call to work with a REST interface.
Jim.