hi
I try to use this code example from xojo but is no working any idea.
thanks
Dim accountID As String = AccountIDField.Text
Dim authToken As String = AuthTokenField.Text
Dim sh As New Shell
Dim command As String
command = “curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/ ” + AccountIDField.Text + "/SMS/Messages.xml’ " + _
“-d 'From=” + EncodeURLComponent(FromPhoneNumberField.Text) + "’ " + _
“-d 'To=” + EncodeURLComponent(ToPhoneNumberField.Text) + "’ " + _
“-d 'Body=” + EncodeURLComponent(SMSTextArea.Text) + "’ " + _
"-u " + accountID + “:” + authToken
sh.Execute(command)
ResultsArea.Text = sh.Result
AlbertoD
(AlbertoD)
June 24, 2023, 4:55am
2
Alexis Colon Lugo:
but is no working
Can you elaborate on that?
Do you get an error?
Did you try the full path to curl?
If you use curl directly does that work?
Edit: did you try the Example that comes with Xojo in Examples - Communication - Internet - Web Services - Twilio - TwilioSMS ?
yes i have this error
curl: (3) URL using bad/illegal format or missing URL
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
AlbertoD
(AlbertoD)
June 24, 2023, 4:02pm
4
Can you use CURL with the URL directly from the terminal/command prompt?
The error is from curl, the information you provided to execute curl is bad.
Have you tested the Xojo Example that comes in recent versions? (the one I mentioned above)
Greg_O
(Greg O)
June 24, 2023, 9:39pm
5
For one thing, you should also be using EncodeURLComponent on the AccountIDField.Text string that you use in the url
ok
thanks for the help now is working