Twilio messaging adapter implementing ITwilioMessaging.
Uses clj-http with Basic auth (account-sid + auth-token). SMS and WhatsApp share the same Messages endpoint; the only difference is the whatsapp: prefix added by core/twilio.
Usage: (def twilio (create-twilio-adapter {:account-sid "ACxxx" :auth-token "token" :from-number "+15005550006"})) (send-sms! twilio {:to "+31612345678" :body "Hello!"})
Twilio messaging adapter implementing ITwilioMessaging.
Uses clj-http with Basic auth (account-sid + auth-token).
SMS and WhatsApp share the same Messages endpoint; the only difference
is the whatsapp: prefix added by core/twilio.
Usage:
(def twilio (create-twilio-adapter
{:account-sid "ACxxx"
:auth-token "token"
:from-number "+15005550006"}))
(send-sms! twilio {:to "+31612345678" :body "Hello!"})(create-twilio-adapter {:keys [account-sid auth-token from-number base-url]})Create a Twilio messaging adapter.
Config keys: :account-sid - Twilio Account SID (required) :auth-token - Twilio Auth Token (required) :from-number - Default From phone number in E.164 format (required) :base-url - Override API base URL for testing (default Twilio production)
Returns: TwilioAdapter implementing ITwilioMessaging
Create a Twilio messaging adapter. Config keys: :account-sid - Twilio Account SID (required) :auth-token - Twilio Auth Token (required) :from-number - Default From phone number in E.164 format (required) :base-url - Override API base URL for testing (default Twilio production) Returns: TwilioAdapter implementing ITwilioMessaging
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |