Elixir wrapper for the EZ Texting SMS API.
The package can be installed as:
- Add
textex
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:textex, "~> 0.2.2"}]
end
```
- Ensure
textex
is started before your application:
```elixir
def application do
[applications: [:textex]]
end
```
Put the following in config/config.exs
or the appropriate environment config file:
config :textex,
sends_username: "replace_me",
password: "and_me_too!",
base_sends_uri: "https://app.grouptexting.com/api", # optional; uses the eztexting API url by default
mode: :production # optional; specifying :test will not make any actual API calls
sms_message = %Textex.SmsMessage{
phone_number: "5555555555", # must be 10 digits
message: "Fire in the hole!",
},
Textex.SmsMessage.send!(sms_message)
# => {:ok, "Message sent"}
sms_messages = [
%Textex.SmsMessage{
phone_number: "5555555555", # must be 10 digits
message: "Fire in the hole!",
},
%Textex.SmsMessage{
phone_number: "5555555555", # must be 10 digits
message: "I've got you in my sights.",
},
]
Textex.SmsMessage.send!(sms_messages)
# => [{:ok, "Message sent"}, {:ok, "Message sent"}]
- Support sending single and multiple SMS messages
- Full support for the sending API
- Support checking credit count
- Support checking whether a keyword is available
- Support voice broadcast