Nicolas Francone
Nicolas Francone

Reputation: 11

Recipient phone number Whatsapp Business Api error

I am using the Whatsapp Business API and I am testing my app using their test format, which gives you a test number and you can add your personal phone number to receive the test template. I am correctly receiving the test template from Meta to my phone number, however when I actually test my app, by me sending a message to that test number, this error shows up:

response: { status: 400, statusText: 'Bad Request', headers: Object [AxiosHeaders] { vary: 'Origin, Accept-Encoding', 'x-business-use-case-usage': '{"199147949938479":[{"type":"whatsapp","call_count":1,"total_cputime":1,"total_time":1,"estimated_time_to_regain_access":0}]}', 'content-type': 'application/json', 'www-authenticate': 'OAuth "Facebook Platform" "invalid_request" "(#131030) Recipient phone number not in allowed list"',

My phone number is definitely in the allowed list as I am receiving their test template with no problems. Maybe there is a problem with my area code? I am from Argentina and my area code is +54. It also has a 9 before the actual phone number. I tried with and without the 9 and in all possible format. No results. Any clues what may be?

Upvotes: 0

Views: 2283

Answers (1)

Lucas Guimaraes
Lucas Guimaraes

Reputation: 3

I had the same problem and the solution was to add my number to the allowed phone list without the 9.

Example from Brazil:

  • You should use {COUNTRY_CODE}{CITY}{PHONE_NUMBER} instead of
  • {COUNTRY_CODE}{CITY}9{PHONE_NUMBER}

In order to verify it you can dig into the response body which usually is at

entry[0].changes[0].value.contacts[0].wa_id

or

entry[0].changes[0].value.messages[0].from

Upvotes: 0

Related Questions