0

Through a Twilio account, I purchase a number and add it to WABA by CLOUD API as follows:

curl --location 'https://graph.facebook.com/WABA_ID/phone_numbers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer EAA.....' \
--data '{
        "cc": "44",
        "phone_number": "77...",
        "verified_name": "verified_name"
    }'

Adding numbers that I have had in the Twilio console for a long time works, but numbers I recently purchased do not:

{
    "error": {
        "message": "(#200) Permissions error",
        "type": "OAuthException",
        "code": 200
    }
}

Adding one of the new numbers through the WA console worked, then I deleted it and then I could add it through this API.

What is the problem and how can it be fixed?

1 Answer 1

0

The endpoint you are using to register the WABA is not maintained by Twilio. It is not related to whether the number purchase is recent or not, as the process is not being carried out within Twilio but rather via Facebook's direct API. It is also worth mentioning that due to changes in Facebook's APIs, some configurations are only allowed via API if the user in question has specific approval as a Meta solutions partner.

2
  • We are approved as a tech provider. In any case, the main question is why sometimes it works and sometimes it doesn't, and I have a way of accurately reproducing the problem. New number purchased, it doesn't work. Add by hand to WABA without purchase and then delete (still without registration to WhatsApp) then add through the API. This seems to be missing a part, and in any case it doesn't always happen. Because numbers I had for a long time worked immediately in the API. Commented Jun 23 at 2:52
  • By the way, it's not necessarily related to Twilio, because the same story happens to me with telnyx numbers as well. Commented Jun 23 at 2:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.