Why is my whatsapp message not being sent?

Viewed 81

Testing with Postman, I'm trying to send a message per the glitch example project from docs

I'm trying to write an API endpoint I can hit with a webhook when people send a message to my Org's whatsapp number. The API would send an automated response.

When I send the POST, with the following body to https://graph.facebook.com/v14.0/redacted/messages it comes back with the following response:

{
  "error": {
    "message": "(#131030) Recipient phone number not in allowed list",
    "type": "OAuthException",
    "code": 131030,
    "error_data": {
      "messaging_product": "whatsapp",
      "details": "Recipient phone number not in allowed list: Add recipient phone number to recipient list and try again."
    },
    "error_subcode": 2655007,
    "fbtrace_id": "A5YKQbpB0PEaaA-gIROEv-n"
  }
}

The error code isn't list one the error codes page, nor can I find anything about adding a recipient phone number anyway (it doesn't make sense to require a pre-defined list of recipient phone numbers to which I can send messages).

Here's the message body:

{
  "messaging_product": "whatsapp",
  "to": "redacted",
  "text": {
    "body": "Ack: Hello world"
  }
}

How do I get the message sent? I'm not able to proceed with development of my app until I can send a message.

1 Answers

I got the same error code and message here.

I was debugging it and see that the from number is a little different than the number I had registered when I will echo the message back.

You can put the number of phone hard coded that you have registered before to see it working.

Related