sendScheduledWhatsAppMessage method
sendScheduledWhatsAppMessage
toNumber
: The whatsapp number to which sms message has to be sent.
messageBody
: The content of the message to be sent.
sendAt
: Time at which the whatsapp message has to be sent (Minimum 15 minutes after current time)
Method called to send scheduled whatsapp messages to the specified phone number with given content.
This requires a Messaging service SID registered with twilio and
it has to be passed in while creating TwilioFlutter.
Returns
201 -> message scheduled successfully.
For more status codes refer
Implementation
Future<int> sendScheduledWhatsAppMessage(
{required String toNumber,
required String messageBody,
required String sendAt}) async {
return await _whatsAppService.sendScheduledWhatsAppMessage(
toNumber: toNumber,
messageBody: messageBody,
twilioCreds: _twilioCreds,
sendAt: sendAt);
}