firebase messagebird扩展不发送短信

发布于 2025-01-24 10:20:28 字数 457 浏览 3 评论 0 原文

我无法通过Firebase扩展程序成功处理SMS的发送。附件是我的JS代码的代码,用于在Firestore集合中生成文档,以及扩展名创建的文档,您可以在其中看到接收到的参数和错误。我已经与Messagebird的支持进行了交谈,但他们无法处理此错误。问题必须在于燃料。

firestoredb.collection('messages').add({
  channelId: 'mychannelID',
  originator : 'Testing',
  recipients : ['34689454416'],
  type: 'sms',
  body : 'This is a test',
});

firestore文档数据和错误:

“

I am not able to successfully process the sending of an sms through the firebase extension. Attached is the code of my js code to generate the document in the firestore collection, as well as the document created by the extension, where you can see the parameters received and the error. I have talked to messagebird support and they do not handle this error. The problem must be with firebase.

firestoredb.collection('messages').add({
  channelId: 'mychannelID',
  originator : 'Testing',
  recipients : ['34689454416'],
  type: 'sms',
  body : 'This is a test',
});

Firestore Document data and error:

Firestore Document data and error

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幽蝶幻影 2025-01-31 10:20:28

如果我查看带有messagesbird 扩展程序,他们显示以下代码示例发送消息:

 db.collection('YOUR_DOCUMENT_COLLECTION').add({
  channelId: 'YOUR_CHANNEL_ID',
  type: 'text',
  content: {
    text: 'YOUR_MESSAGE_CONTENT'
  },
  to: 'RECIPIENT_OF_THE_MESSAGE',
});

基于此,您似乎需要在名为 to 的字段中指定收件人,而您的字段名为收件人

If I look at the documentation for the Send Messages with MessageBird extension, they show the following code sample for sending a message:

 db.collection('YOUR_DOCUMENT_COLLECTION').add({
  channelId: 'YOUR_CHANNEL_ID',
  type: 'text',
  content: {
    text: 'YOUR_MESSAGE_CONTENT'
  },
  to: 'RECIPIENT_OF_THE_MESSAGE',
});

Based on that, it seems you need to specify the recipient(s) in a field named to, while you have field named recipients.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文