0
votes

I got this error from Twilio while sending an outbound message to WhatsApp number:

{"ErrorMessage":"A text message body or media urls must be specified.","ErrorCode":21619,"MessageStatus":{},"Message":"Failed to send message through Twilio."

We did verify that the message we were sending was not null or empty. Has anyone faced this issue? What are the possible circumstances under which this error might be encountered? As I mentioned, we do have validators on messages we send and we verified its not null or empty.

1
Is there any way you can include a code sample of how you're making the request? Or perhaps you can post more detailed output from the Twilio debugger? Without that one can only guess what the issue could be.Brodan

1 Answers

0
votes

The same error. Solution on node.js was specify variables:

.create({
  body: 'message text',
  from: 'sender name',
  to: 'receiver number',
  messagingServiceSid: process.env.TWILIO_SERVICE_ID, 
})

Before finding solution was:

.create({
  'message text',
  'sender name',
  'receiver number',
  process.env.TWILIO_SERVICE_ID, 
})