TwilioServiceClient
public protocol TwilioServiceClient
The Twilio service client, which can be used to send text messages with Twilio via MongoDB Stitch.
-
Sends an SMS/MMS message.
Declaration
Swift
func sendMessage(to: String, from: String, body: String, mediaURL: String?, _ completionHandler: @escaping (StitchResult<Void>) -> Void)Parameters
toThe number to send the message to.
fromThe number that the message is from.
bodyThe body text of the message.
completionHandlerThe completion handler to call when the message is sent or the operation fails. This handler is executed on a non-main global
DispatchQueue.
TwilioServiceClient Protocol Reference