简体   繁体   English

使用 Twilio API,Whatsapp 批准的 Twilio 号码,预先批准的模板,无法接收 whatsapp 消息

[英]Using the Twilio API, Whatsapp approved Twilio number, pre-approved template, unable to receive whatsapp message

I have a Whatsapp enabled Twilio number, but I do not receive messages from it.我有一个启用了 Whatsapp 的 Twilio 号码,但我没有收到来自它的消息。

message = client.messages.create(
                              from_='whatsapp:+1910708xxxx',
                              body='This is your flight confirmation for '
                                   'IND-11 on 1/1/2022.',
                              to='whatsapp:+91xxxxxxxx'

However when I change the from number to the Whatsapp sandbox number , I do receive the message.但是,当我将from号码更改​​为Whatsapp 沙箱号码时,我确实收到了消息。

I did try to send a whatsapp message to my twilio number .. but I endup in my Messaging app inviting the number to use Whatsapp .. It is almost as if there are steps that needs to be done set Twilio number up for WA messaging ..我确实尝试向我的 twilio 号码发送 whatsapp 消息.. 但我最终在我的消息应用程序中邀请该号码使用 Whatsapp .. 几乎好像需要完成一些步骤来设置 Twilio 号码以用于 WA 消息传递。 .

What am I missing ?我错过了什么?

I think you should use your sandbox number because I found it in Twilio documentation:我认为您应该使用您的沙箱编号,因为我在 Twilio 文档中找到了它:

The Sandbox allows you to prototype with WhatsApp immediately using a shared phone number without waiting for your Twilio number to be approved by WhatsApp.沙盒允许您使用共享电话号码立即使用 WhatsApp 进行原型制作,而无需等待您的 Twilio 号码被 WhatsApp 批准。

so it means if you're unable to send Whatsapp messages from your Twilio number then it's not approved by Whatsapp yet!所以这意味着如果您无法从您的 Twilio 号码发送 Whatsapp 消息,那么它还没有被 Whatsapp 批准!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM