Understanding CURL to Omnis example
Das Goravani
goravanis at gmail.com
Thu Mar 9 19:41:40 UTC 2023
Using the CURL example and what Kelly wrote about putting it all on one line, I did this
I am using the HTTP Post command which takes HOST and URI
I got the host right, since I’m getting back a response, in my URI I put
/2010-04-01/Accounts/AC75801fa7b99e6025f8816739b5ecdc9e/Messages.json?To=+14243539546&From=+15676777733&Body=Your%20Insurance%20Verification%20Number%20is%3A%20310726 -u AC75801fa7b99XXXXXXXX39b5ecdc9e:410a9c4478XXXXXXXXX2f487e7c30ae
Note the -u and account codes following it. It is saying in the response that I am unauthorized.
I have put in the credentials just as they show how..
Space -u space AC:Token
But it still says unauthorized
Can anyone shed some light?
> On Mar 9, 2023, at 2:09 PM, Das Goravani <goravanis at gmail.com> wrote:
>
>
> 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