-
Notifications
You must be signed in to change notification settings - Fork 3
External Dependencies
Courtbot depends on a a few external dependencies. Courtbot uses Twilio for sending and receiving SMS and Rollbar for error monitoring.
Twilio is required for Courtbot to send and receive SMS and has two setups that must be completed for it to be setup. The first being a Webhook; which is how Courtbot is notified of incoming messages. The second and last step is the generation of REST API credentials; Courtbot uses these credentials for it's reminder functionality.
While setting up a Webhook you will be either required to use a pre-existing number purchased via Twilio or to buy a new one; This guide assumes the latter.
- Buy a phone number that is SMS capable: https://www.twilio.com/console/phone-numbers/search
- Manage your numbers: https://www.twilio.com/console/phone-numbers/incoming
- Select the number you want Courtbot to respond to
- On the "Configure" tab under the "Messaging" section add your
http://HOST/sms/:locale
to the section "A MESSAGE COMES IN"-
HOST
can refer to your Heroku endpoint, the domain Courtbot is hosted on, or thengrok
forwarding address. -
:locale
can be omitted, by default it will will assumeen
-
- On the "Configure" tab under the "Messaging" section add your
View your Project Settings for your REST API keys. Courtbot needs configured with the two environment variables or by setting config:
TWILIO_ACCOUNT_SID
TWILIO_AUTH_TOKEN
config :ex_twilio,
account_sid: "<sid>",
auth_token: "<token>"
NOTE: When your first setting up Courtbot it is recommended to use the TEST credentials provided by Twilio (found in your project settings.)
Optionally, for a production environment you can configure Rollbar for error monitoring and logging.
NOTE: If you don't have a pre-existing Rollbar account you want to use and are deploying via Heroku, please ignore and follow the Heroku Rollbar setup steps.
If you have a pre-existing Rollbar account then you can create a new project, Select "Elixir" for your framework, and upon deployment set the ROLLBAR_ACCESS_TOKEN
environment variable. No additional effort should be required.