URL = "https://www.160.com.au/api/sms.asmx" User = "your-login" Secret = "your-sms-secret" Recipient = "00000000004" Auth = "Username=" + User + "&password=" + Secret + "&" '' Send Message PostDataSendSMS = Auth + "action=SendMessage&mobileNumber=" + Recipient + "&messageText=A%20Test%20from%20VBA" '' Get Balance PostDataBalance = Auth + "action=GetCreditBalance" '' Get Status PostDataStatus = Auth + "action=GetMessageStatus&messageId=" Function Connect(PostData) Set http = CreateObject("MSXML2.ServerXMLHTTP") With http .Open "POST", URL, False .setRequestHeader "Content-Type", "application/x-www-form-urlencoded" .setRequestHeader "User-Agent", "Excel/VBA" .send PostData Set xmldoc = CreateObject("MSXML2.DOMDocument") xmldoc.LoadXML .responseXML.XML End With Set response = xmldoc.SelectNodes("//string") Connect = response(0).Text End Function text = Connect(PostDataBalance) If Left(text, 4) = "ERR:" Then MsgBox "Error of getting balance: " + text Else MsgBox "Your balance is " + text text = Connect(PostDataSendSMS) If Left(text, 4) = "ERR:" Then MsgBox "Error of sending SMS: " + text Else MsgBox "Your SMS ID is " + text text = Connect(PostDataStatus+text) MsgBox "SMS status: " + text End If End If