curling twilio API
dwilliams at livecode.com
Wed Sep 9 09:49:44 EDT 2015
Off the top of my head, this would probably look something like the
following in LC:
post tPostString to
Where tPostString contains the post fields concatenated by & (for the
example you posted):
You can just sidestep this whole thing if you're on OSX/Linux by accessing
curl directly with shell():
get shell("curl -X POST
--data-urlencode 'To=5034554562' --data-urlencode 'From=+1212022183'
--data-urlencode 'Body=test message' -u
I would also strongly advise against posting your API keys publicly and
recommend you change the one you just posted, as there are bots which
crawl the public-facing web for such keys.
On Wed, 09 Sep 2015 12:24:19 +0100, Jose Damaso <rjd318 at gmail.com> wrote:
> Hi all - can someone help me convert the following?
> curl -X POST
> --data-urlencode 'To=5034554562' \
> --data-urlencode 'From=+1212022183' \
> --data-urlencode 'Body=test message' \
> -u AC0afb9e5c70c0fde47904a9a6ff:e6a1bdc2a7a7484d6cdc96e
> I just don't have any experience working with http(s) APIs and I've been
> working through the forum posts as best I can. The only thing I've
> so far is using urlEncode for the --data-urlencode lines. Are the -X POST
> and -u parts done in httpheaders?
> Any help would be greatly appreciated - thanks!
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
Using Opera's mail client: http://www.opera.com/mail/
More information about the use-livecode