Understanding CURL to Omnis example

Das Goravani goravanis at gmail.com
Thu Mar 9 19:09:41 UTC 2023


	
Twilio gives this CURL example as how to send them text messages.

curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages.json <https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages.json> \
--data-urlencode "To=+13105555555" \
--data-urlencode "From=+12125551234" \
--data-urlencode "MediaUrl=https://demo.twilio.com/owl.png <https://demo.twilio.com/owl.png>" \
--data-urlencode "Body=Hello from my Twilio line!" \
-u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'

Kelly wrote the following:

So that would mean you could send

POST https://api.twilio.com/2010-04-01/Accounts/<yourID>/Messages.json?To=+13105555555&From=+12125551234&Body=Hello <https://api.twilio.com/2010-04-01/Accounts/%3CyourID%3E/Messages.json?To=+13105555555&From=+12125551234&Body=Hello> from my Twilio line!

I see how to put in the To and From and Body.. but that last line.. how do you put that in.

Would I put in my URL a space, then -u then space, then my codes?

Would I include the single quote around my codes that they show in this example?

And I would put all this into URI for the HTTP Post command? (Thus not using Contents or Headers lists)?




More information about the omnisdev-en mailing list