I am using flutter to send this message. The template is approved and still i am getting error.
final TwilioFlutter twilioFlutter = TwilioFlutter(
accountSid:
'xxxxxxxxxxxxx', // replace with Account SID
authToken: 'xxxxxxxxxxxxxxxxx', // replace with Auth Token
twilioNumber:
'+xxxxxxxxxxx', // replace with Twilio Number(With country code)
);
Future<void> sendOtp(String otp, String phoneNumber) async {
String messageBody = "Hi, Enter 123456 to continue";
try {
await twilioFlutter.sendWhatsApp(
toNumber: '+91$phoneNumber',
messageBody: messageBody,
);
print('OTP sent successfully');
} catch (e) {
print('Failed to send OTP: $e');
}
}
I dont have A2P DLC, is that required for whatsapp messaging?
If not what could be the issue?