If after entering the confirmation code when connecting WhatsApp Cloud API, the number remains in "Awaiting Confirmation" status, you need to send a POST request to Postman to confirm the number.
You need this:
- The confirmation code that was received on the number when the account was created;
- Access token generated under the system user with administrator rights on business.facebook.com;
- Phone number id from the API Settings section of the created application on developers.facebook.com.
- Open Postman, create a new POST request, and in the request line enter: https://graph.facebook.com/v20.0/phonenumberid/register, where the phonenumberid is the id of the number to be connected.
- Go to "Autorization" - "Auth Type", select "Meta API" - "Bearer token", in the "Bearer token" field specify the access token generated under the system user with administrator rights.
- In "Body" select "raw", in the input field insert the code, where 000000 is the 6-digit confirmation code received to the number when creating the account.
{
"messaging_product": "whatsapp",
"pin": "000000"
}
- Click "Send" to forward the request.
If all data are filled in correctly - the status 200 OK will be returned. - The status of the number on Facebook will change to "Connected".