public class SmsActionPackTwilio extends Object implements SmsActionPack
com.cultofbits.integrationm.service.properties
file
with the sms
key:
action.names=...,<sms-ap-name> # For Twilio Provider action.<sms-ap-name>=sms action.<sms-ap-name>.provider=twilio action.<sms-ap-name>.twilio.sid=<Twilio Service Id> action.<sms-ap-name>.twilio.token=<Twilio Token> action.<sms-ap-name>.twilio.default-from=<Twilio account phone number>
Recomended sms-ap-name: sms
In case <sms-ap-name> is sms, in the IntegrationM scripts, you can refer to it only by `sms.send(...)` otherwise you have to refer to it using `actionpacks.<sms-ap-name>.send(...)`
Constructor and Description |
---|
SmsActionPackTwilio(String twilioSid,
String twilioToken,
String twilioDefaultPhoneNr) |
Modifier and Type | Method and Description |
---|---|
void |
send(String text,
List<String> to,
Map<String,Object> options)
Sends a sms to the provided destination using a twilio account.
|
public void send(String text, List<String> to, Map<String,Object> options)
send
in interface SmsActionPack
text
- the sms contentto
- a list of one or more phone numbers to send the message tooptions
- the sms options map. The available options are:
from
: an alternative twilio phone number to use as the sender. If no from is
defined then the default number configured in action.sms.twilio.default-from will be used.
Copyright © 2021 Cult Of Bits, lda