简体   繁体   English

使用测试帐户的 WhatsApp 业务平台 API 不会将消息发送到移动设备

[英]WhatsApp Business Platform API using Test account doesn't send the message to Mobile

I have created a WhatsApp Business Platform Test account.我已经创建了一个 WhatsApp Business Platform 测试帐户。 I am able to send and receive the hello-world template message but when I send a test message without template(as specified by the api) it doesn't push it to the mobile phone.我能够发送和接收 hello-world 模板消息,但是当我发送没有模板的测试消息(由 api 指定)时,它不会将其推送到手机。 Strangely I get success response in both cases.奇怪的是,我在这两种情况下都得到了成功的回应。

Url: https://graph.facebook.com/v15.0/11ZZZZZZZZZZZZZ/messages Url: https://graph.facebook.com/v15.0/11ZZZZZZZZZZZZZ/消息

Here are the jsons and their responses这是 json 及其响应

{
   "messaging_product":"whatsapp",
   "to":"91ZZZZZZZZZZ",
   "type":"template",
   "template":{
      "name":"hello_world",
      "language":{
         "code":"en_US"
      }
   }
}

{
   "messaging_product":"whatsapp",
   "contacts":[
      {
         "input":"91ZZZZZZZZZZ",
         "wa_id":"91ZZZZZZZZZZ"
      }
   ],
   "messages":[
      {
         "id":"wamid.HBgMOTE3MjkwMDIxMzYwFQIAERgSMjZCRkQ3RDc0RjM0QkNEZZZZZZ=="
      }
   ]
}

In these case I successfully receive message on the mobile在这些情况下,我在手机上成功收到消息

{
   "messaging_product":"whatsapp",
   "to":"91ZZZZZZZZZZ",
   "type":"text",
   "text":{
      "preview_url":false,
      "body":"Hello World Testing"
   }
}

{
   "messaging_product":"whatsapp",
   "contacts":[
      {
         "input":"91ZZZZZZZZZZ",
         "wa_id":"91ZZZZZZZZZZ"
      }
   ],
   "messages":[
      {
         "id":"wamid.HBgMOTE3MjkwMDIxMzYwFQIAERgSQUJERkM2RUE1RTEwQTExZZZZZZ=="
      }
   ]
}

However I don't receive message on the mobile.但是我没有在手机上收到消息。 Is there anything I am missing in the second case?在第二种情况下我遗漏了什么吗?

I was strugging with the same problem but i figured out you need to reply back to your first template message with a hello or any kind of reply.我遇到了同样的问题,但我发现你需要用你好或任何类型的回复来回复你的第一条模板消息。 Once you reply then only you can send a message through watsapp api without template or you can inititate conversation through watsapp api.回复后,只有您可以通过 watsapp api 发送消息而不使用模板,或者您可以通过 watsapp api 发起对话。

Hope this answer helps you.希望这个答案对你有帮助。

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

相关问题 在whatsapp业务云api中向多个收件人发送消息 - Send a message to multiple recipients in whatsapp business cloud api 在WhatsApp商业API帐户中使用不同的电话号码 - Using different phone numbers in whatsapp business api account 无法使用 whatsapp 业务 api 将我传入的 whatsapp 消息标记为已读 - can not mark as read my incoming whatsapp message using whatsapp business api 是否有必要拥有一个 facebook 业务管理帐户才能与 WhatsApp Business API 一起使用? - Is it nessessory to have a facebook business manage account to work with WhatsApp Business API? 如何使用 Whatsapp Cloud API 发送短信 - How to send a text message with Whatsapp Cloud API 如何仅在 C# 中使用 WhatsApp API 发送 WhatsApp 消息(不应使用任何第三方 API 链接) - how to send WhatsApp message using WhatsApp API only in C#(should not use any third-party API links) 使用android / ios应用程序发送whatsapp消息 - Send whatsapp message using android/IOS aplication 当我们通过 WhatsApp 发送图像时,如何在 WhatsApp Business Cloud API 中获取图像的 URL - How to get the URL of an image in WhatsApp Business Cloud API, while we send an image through WhatsApp 使用哪个 WhatsApp 企业帐户 ID? - Which WhatsApp Business Account ID to use? 使用 PHP 通过 WhatsApp API 发送消息 - Sending a message by the WhatsApp API using PHP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM