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

    to

    The number to send the message to.

    from

    The number that the message is from.

    body

    The body text of the message.

    completionHandler

    The completion handler to call when the message is sent or the operation fails. This handler is executed on a non-main global DispatchQueue.