twilio
Provides methods for working with Twilio service.

getLastSms

Retrieves last SMS message.
Parameters:
Name
Type
Description
removeOnRead
Boolean
Specifies whether to delete the message after reading it.
timeout
Number
Timeout in milliseconds for waiting for the message to arrive.
notOlderThan
Number
optional Retrieve message only if it arrived not before the given time (in ms). Default is 4 minutes.
fromNumber
String
optional From number to filter message
Returns:
String - SMS text.

init

Set Twilio authentication details.
Parameters:
Name
Type
Description
accountSid
String
Account SID.
authToken
String
Authentication token.

sendSms

Send an SMS.
Usage example:
1
twilio.init('Account Sid', 'Account Token');
2
twilio.sendSms('+1xxxxxxxxxx', '+972xxxxxxxxx', 'Hello World!');
Copied!
Parameters:
Name
Type
Description
from
String
Phone number to send from.
to
String
Phone number to send to.
message
String
Message to send.
Returns:
String - Message SID.
Last modified 8mo ago
Copy link