P Pathrose Member Licensed User Longtime User Jun 8, 2022 #1 Hi, I would like to incorporate an SMS sending functionality into my App. It's another service provider like Twilio. They have provided the sample API in various languages like python, java, etc. How to convert this to B4A code. Just attaching the sample in VBA provided by them...Please help Public Sub Send() Dim username As String Dim password As String Dim result As String Dim myURL As String Dim Sender As String Dim numbers As String Dim Message As String Dim postData As String Dim winHttpReq As Object apikey = "yourAPIkey" Sender = "TXTLCL" numbers = "918123456789" Message = "This is your message" Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1") myURL = "https://api.textlocal.in/send/?" postData = "apikey=" + apikey + "&message=" + Message + "&numbers=" + numbers + "&sender=" + Sender winHttpReq.Open "POST", myURL, False winHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded" winHttpReq.Send (postData) SendSMS = winHttpReq.responseText End Sub
Hi, I would like to incorporate an SMS sending functionality into my App. It's another service provider like Twilio. They have provided the sample API in various languages like python, java, etc. How to convert this to B4A code. Just attaching the sample in VBA provided by them...Please help Public Sub Send() Dim username As String Dim password As String Dim result As String Dim myURL As String Dim Sender As String Dim numbers As String Dim Message As String Dim postData As String Dim winHttpReq As Object apikey = "yourAPIkey" Sender = "TXTLCL" numbers = "918123456789" Message = "This is your message" Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1") myURL = "https://api.textlocal.in/send/?" postData = "apikey=" + apikey + "&message=" + Message + "&numbers=" + numbers + "&sender=" + Sender winHttpReq.Open "POST", myURL, False winHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded" winHttpReq.Send (postData) SendSMS = winHttpReq.responseText End Sub
DonManfred Expert Licensed User Longtime User Jun 8, 2022 #2 Search Results www.b4x.com okhttputils2 is all you need. Based on your example i guess job.postmultipart should fit here. Upvote 0
Search Results www.b4x.com okhttputils2 is all you need. Based on your example i guess job.postmultipart should fit here.