crystal-experiments

Crystal Experiments with the Twilio API

Crystal Experiments with the Twilio API

These are some experiments using Crystal to access the Twilio API.

More coming soon...

Setup

To use the code, you will need to install Crystal.

Ensure your Crystal installation is working by checking the version on the command line:

$ crystal --version
Crystal 0.19.4 (2016-10-21)

Credentials

To test out these experiments, you will need a Twilio account. You can sign up for a free Twilio account here. You need to get your Twilio Account SID and Auth Token to authenticate with Twilio. You will also need a Twilio number that can send SMS messages.

These experiments use environment variables to keep credentials and other secrets out of this repository. You will need to export your credentials to the environment, like so:

$ export TWILIO_ACCOUNT_SID=YOUR_TWILIO_ACCOUNT_SID
$ export TWILIO_AUTH_TOKEN=YOUR_TWILIO_AUTH_TOKEN
$ export TWILIO_NUMBER=YOUR_TWILIO_NUMBER
$ export MY_NUMBER=YOUR_PHONE_NUMBER

Run the examples

Once you have Crystal installed and your credentials saved in the environment, you can compile and run the experiment with:

$ crystal src/sms.cr

Questions, comments, issues?

Either send them to issues or let me know on Twitter at @philnash.

Repository

crystal-experiments

Owner
Statistic
  • 1
  • 0
  • 0
  • 0
  • 0
  • about 8 years ago
  • November 2, 2016
License

Links
Synced at

Thu, 21 Nov 2024 21:27:36 GMT

Languages