Twilio 错误代码 21619:无法通过 Twilio 发送消息

问题描述 投票:0回答:2

我在向 WhatsApp 号码发送出站消息时从 Twilio 收到此错误:

{"ErrorMessage":"必须指定短信正文或媒体 URL。","ErrorCode":21619,"MessageStatus":{},"Message":"无法通过 Twilio 发送消息。"

我们确实验证了我们发送的消息不为空。有人遇到过这个问题吗?在什么情况下可能会遇到此错误?正如我提到的,我们发送的消息确实有验证器,并且我们验证了它不为空或空。

twilio whatsapp twilio-api
2个回答
2
投票

同样的错误。 Node.js 上的解决方案是指定变量:

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

在找到解决方案之前是:

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

0
投票

记得检查@twilio/runtime-handler的版本

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.