WhatsApp Business Platform API using Test account doesn't send the message to Mobile
I have created a WhatsApp Business Platform Test account. 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. Strangely I get success response in both cases.
Url: https://graph.facebook.com/v15.0/11ZZZZZZZZZZZZZ/messages
Here are the jsons and their responses
{ "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 that you need to reply back to your first template message with a 'hello' or any kind of reply. Once you reply, only then can you send a message through that watsapp api without a template, or you can inititate conversation through watsapp api.
Hope this answer helps you.
Thanks. This solution works perfectly. Remember if user replies to that template you can send normal messages with whatsapp api
@ouflak - do you know the other way around? I have a business initiated API configured but unless my users says "hi" to the account, we are not able to send the Whatsapp Authentication messages.
@Ravi, Your question really is meant for the OP of this answer Arjun A. I think he gets pinged as well when you comment, but just to be sure you might want to just post a quick comment (don't need the '@').