Twilex is an Elixir Client to send SMS/MMS using Twilio.
- Add twilex to your list of dependencies in
mix.exs:
def deps do
[{:twilex, "~> 0.0.1"}]
end- Ensure twilex is started before your application:
def application do
[applications: [:twilex]]
endAdd the following to your config.exs file:
config :twilex,
sid: "YOUR_TWILIO_SID",
token: "YOUR_TWILIO_AUTH_TOKEN" # Twilex.Messenger.send_sms("from_number", "to_number", "body_text", "optional_media_url")
iex(1)> Twilex.Messenger.send_sms("15005550006", "15005550001", "test text", "https://github.com")