class Telesign::MessagingClient
TeleSign's Messaging API allows you to easily send SMS messages. You can send alerts, reminders, and notifications, or you can send verification messages containing one-time passcodes (OTP).
Public Instance Methods
message(phone_number, message, message_type, **params)
click to toggle source
Send a message to the target phone_number.
See developer.telesign.com/docs/messaging-api for detailed API documentation.
# File lib/telesign/messaging.rb, line 15 def message(phone_number, message, message_type, **params) self.post(MESSAGING_RESOURCE, phone_number: phone_number, message: message, message_type: message_type, **params) end
status(reference_id, **params)
click to toggle source
Retrieves the current status of the message.
See developer.telesign.com/docs/messaging-api for detailed API documentation.
# File lib/telesign/messaging.rb, line 27 def status(reference_id, **params) self.get(MESSAGING_STATUS_RESOURCE % {:reference_id => reference_id}, **params) end