This guide provides overview information relating to phone numbers for Solution Partners and customers. Additionally, this guide contains process information for Solution Partners in the case that they have to manage a customer's phone number and certificates.
There are some details that businesses need to know surrounding phone numbers and Embedded Signup.
Businesses need a dedicated number to use WhatsApp through embedded signup. If a business has a number actively registered on WhatsApp Messenger or the WhatsApp Business App, they are not able to use the same phone number.
Businesses can have multiple phone numbers associated with their Meta Business Account, so all they have to do is add another phone number and use that for WhatsApp.
A business cannot sign up using the embedded signup flow with a phone number that has already been registered with the Business or consumer application versions of WhatsApp.
For more detailed information relating to phone numbers and WhatsApp for Business Platform, see Phone Numbers.
For information on how to migrate an existing registered WhatsApp phone number, see Migrate Phone Number.
This section is directed towards customers of Embedded Signup and provides guidance about actions they may perform relating to phone numbers.
There are two methods to add additional numbers to a WhatsApp Business Account (WABA):
This section is directed towards Solution Partners and provides instructions for managing customer phone numbers and certificates.
Use the GET /<WABA_ID>/phone_numbers endpoint to get a list of business phone numbers on a business customer's WABA.
curl 'https://graph.facebook.com/<API_VERSION>/<CUSTOMER_WABA_ID>/phone_numbers' \ -H 'Authorization: Bearer <CUSTOMER_BUSINESS_TOKEN>'
Upon success:
{ "data": [ { "verified_name": "<VERIFIED_DISPLAY_NAME>", "code_verification_status": "<VERIFICATION_STATUS>", "display_phone_number": "<DISPLAY_PHONE_NUMBER>", "quality_rating": "<QUALITY_RATING>", "platform_type": "CLOUD_API", "throughput": { "level": "<THROUGHPUT_LEVEL>" }, "webhook_configuration": { "application": "<WEBHOOK_CALLBACK_URL>" }, "id": "<BUSINESS_PHONE_NUMBER_ID>" } ], "paging": { "cursors": { "before": "<BEFORE_CURSOR>", "after": "<AFTER_CURSOR>" } } }
After a successful phone verification from the embedded signup flow, registration should succeed with an API call to the register
endpoint. For this, provide any code_method
(sms
| voice
). Since the phone number is already verified, you do not need to worry about the registration code. The verify
API call is not required.
Alternatively, you can pre-verify phone numbers and offer them to your customers in the new Embedded Signup flow. This prevents customers from having to contact you for a one-time password during the onboarding process. See Pre-Verified Phone Numbers.
After a successful phone verification from the embedded signup flow, registration should succeed with an API call to the account
endpoint. For this, provide any code_method
(sms
| voice
). Since the phone number is already verified, you do not need to worry about the registration code. The verify
API call is not required.
Alternatively, you can pre-verify phone numbers and offer them to your customers in the new Embedded Signup flow. This prevents customers from having to contact you for a one-time password during the onboarding process. See Pre-Verified Phone Numbers.
คุณต้องลงทะเบียนหมายเลขโทรศัพท์ภายในเวลาไม่เกิน 14 วัน หลังจากดำเนินตามขั้นตอนการสมัครใช้งานแบบฝังเสร็จสิ้นแล้ว หากไม่ได้ลงทะเบียนหมายเลขในระหว่างช่วงเวลานั้น โทรศัพท์ดังกล่าวจะต้องเข้าสู่ขั้นตอนการสมัครใช้งานแบบฝังอีกครั้งก่อนลงทะเบียน
The phone_numbers
endpoint allows you to see the status of a phone number's display name and to retrieve the certificate after a name change. See the Read Phone Numbers for more information.
In the following example, use the ID for the assigned WABA.
curl -i -X GET "https://graph.facebook.com/v21.0
/{waba-id}/phone_numbers
?fields=
display_phone_number,
certificate,
name_status,
new_certificate,
new_name_status
&access_token={system-user-access-token}"
{ "data": [ { "id": "1972385232742141", "display_phone_number": "+1 631-555-1111", "last_onboarded_time": "2023-08-22T19:05:53+0000", "certificate": "AbCdEfGhIjKlMnOpQrStUvWxYz", "new_certificate": "123AbCdEfGhIjKlMnOpQrStUvWxYz", "name_status": "APPROVED", "new_name_status": "APPROVED", } ] }
Name | Description |
---|---|
| The review status of the current display name request. Click the arrow in the left column for available options. |
| The review status of a display name change request. This field returns data only if a display name change was requested. |
| Returns the current certificate for that phone number. |
| The certificate of a new display name, after a display name change has been approved. This field returns data only if a display name change request was approved and is available until the phone number has been registered with the new certificate. |
To see if a phone number has been verified via OTP (one-time password), check that number’s code_verification_status
field. First, make a GET
call to the /{whatsapp-business-account-id}/phone_numbers
endpoint:
curl -i -X GET \
"https://graph.facebook.com/v21.0
/{waba-id}/phone_numbers
?access_token={your-access-token}"
The response includes the code_verification_status with one of the following options: VERIFIED
or NOT_VERIFIED
. A sample response looks like this:
[ { "code_verification_status": "NOT_VERIFIED", "id": "1754951608042154" } ]
Alternatively, you can get the status by calling a phone number's ID:
curl -i -X GET \
"https://graph.facebook.com/v21.0
/{phone-number-id}
?access_token={your-access-token}"
Use the WhatsApp Business Account > Phone Numbers endpoint to get a phone number's ID. See Retrieve Phone Numbers for usage details.
You can query phone numbers and filter them based on their account_mode
. For the request, you can use the parameters listed below.
Name | Description |
---|---|
| Contains the field being used for filtering. In this example, you should use |
| Contains how you want to filter the accounts. In this example, you should use |
| Contain what account mode you are looking for. Click the arrow in the left column for supported values. |
In the following example, use the ID for the assigned WABA.
curl -i -X GET "https://graph.facebook.com/v21.0
/{waba-id}/phone_numbers
?filtering=[{
"field":"account_mode",
"operator":"EQUAL",
"value":"SANDBOX"}]
&access_token={system-user-access-token}"
{ "data": [ { "id": "1972385232742141", "display_phone_number": "+1 631-555-1111", "verified_name": "John’s Cake Shop", "quality_rating": "UNKNOWN", } ], "paging": { "cursors": { "before": "abcdefghij" "after": "klmnopqr" } } }