1

I've setup a WhatsApp Business to test their new WhatsApp API for sending messages. I've followed the getting started guide, but I'm running into an issue when trying to send a test message to my phone.

I tested sending messages using the test message call in the business settings as shown in the guide and I've created my own /messages call in Postman using a permanent token. Both calls return a 200 status, but neither of them actually sends a message to my phone.

To double check my setup, I added a colleagues phone to the setup and he receives the messages and can interact with my webhook via WhatsApp just fine.

Some posts on Stackoverflow mention having to send a message to the test number first, but I was unable to get this to work and my colleague didn't have to do this.

Is there some kind of setting or issue that could explain why I'm not receiving the messages? I've even tried re-installing WhatsApp and setting up my phonenumber again, but that didn't change anything either.


Updates:

I tried validating my phonenumber via the /contacts endpoint, but it keeps returning an auth error. Updating my token to include all Whatsapp permissions did not change this, whatsapp_business_api_data isn't an option to include.

{
"error": {
    "message": "(#100) The parameter whatsapp_business_api_data is required.",
    "type": "OAuthException",
    "code": 100,
    "fbtrace_id": ""
}
}

I noticed that my webhook included a status object in change.value.statuses.[0] this mentioned the following:

{ status: 'failed', errors: [{  code: 131000, title: 'Failure due to an internal error. Please retry.' }]}

Next I created a new app and added the Whatsapp integration, I added and validated my phonenumber via a text and tried to send a test messsage. This also doesn't start a conversation nor does it give me any feedback. If I try to add my phonenumber again, by adding it as another number, I cant and get the error Reason: VERIFIED

Jordi
  • 3,041
  • 5
  • 17
  • 36
  • 1
    Not only do some posts on SO mention that the user needs to message first, so does https://developers.facebook.com/docs/whatsapp/on-premises/get-started#send-a-test-message: _"You will need to send your WhatsApp account a message from the test phone number to enable the Customer Service window, which allows you to send any type of message within the 24-hours window"_ – CBroe Jun 15 '22 at 13:28
  • We didn't do this when adding my colleagues number as a test number. We just verified it and sent a test message. It worked without him having to sent any messages to the WhatsApp account. I tried sending a message, but WhatsApp won't allow me to message the WhatsApp account of my business and regular text messages aren't being delivered to the account. – Jordi Jun 15 '22 at 13:51
  • Did you check the status of the number you are using, as it says there, and with what result? Have you checked your webhook for any notifications regarding problems? – CBroe Jun 15 '22 at 13:53

6 Answers6

1

So it's not the best answer to the issue, but I got a new phonenumber to test this out on. I added it to my test numbers, validated the number, sent a test message to the new number and received it just fine.

I'm not sure if the issue was caused by a privacy setting or an issue on Facebook side, but the old number still doesn't receive the messages.

Jordi
  • 3,041
  • 5
  • 17
  • 36
0

You can only send a template type message as your first message to a user. From the error message, it looks like you're hitting the Graph API version lower than v12.0. Try with V12.0 and higher. Also, it will be helpful if you can paste the response you get from your API request and in your Webhook.

Navjot Singh
  • 626
  • 1
  • 5
  • 16
  • I'm sending the test message made by Facebook. So I don't think this is the issue. I tried a new phonenumber and the message got through just fine. – Jordi Jul 06 '22 at 07:40
  • I solved it in v14.0 answering the first template message – Cami Rodriguez Sep 24 '22 at 18:22
  • Why do we have to wait for the user to respond, before sending custom messages? – Sujoy Dec 11 '22 at 03:30
  • I tried many template type messages but all of them got rejected. Meta is treating us like we were their slaves feeding their databases with our data to make them bigger – Nulik Feb 01 '23 at 01:08
0

I had the same error code but with a different message: enter image description here

I fixed it by deleting the whatsapp number here and adding it again.

josue.0
  • 775
  • 1
  • 10
  • 23
0

Check the company code. It should be prefixed.

{ "messaging_product": "whatsapp", "to": "91xxxxxxxx", "type": "template", "template": { "name": "hello_world", "language": { "code": "en_US" } } }
Atul Jain
  • 1,035
  • 2
  • 16
  • 24
0

Some colleagues weren't receiving any messages. In my case, the problem was that they haven't accepted the WhatsApp's Terms and Condition.

To accept the terms, they had to start a new conversation with the business. A popup appears to review and accept the terms.

Once accepted, they received the messages without problem.

PS: I'm in Spain, maybe it's a European Union thing...

Anfuca
  • 1,329
  • 1
  • 14
  • 27
0

I got the same issue, resolved it by sending the message multiple times through the api in watsapp setup, getting started page. Also accepted the number in personal watsapp by allowing it to continue.