Haskell wrapper for sending SMS using textlocal SMS gateway.
- Get an api key from textlocal.in
- Quick way to send:
import Network.Api.TextLocal
let cred = createUserHash "myemail@email.in" "my-secret-hash"
res <- sendSMS "hello world" ["911234567890"] cred
res
Right (TLResponse {status = Success, warnings = Nothing, errors = Nothing})
Or in a more configurable way:
import Network.Api.TextLocal
let mySettings = setTest True defaultSettings
res <- runSettings SendSMS mySettings
res
Right (TLResponse {status = Success, warnings = Nothing, errors = Nothing})