Represents a collection of business phone numbers associated with a WhatsApp Business Account (WABA).
For more information on how to use the API, see WhatsApp Business Management API.
Get a list of phone numbers associated with a WhatsApp Business Account.
Type | Description |
---|---|
Access Tokens | User or System User |
Permissions |
GET https://graph.facebook.com/<API_VERSION>/<WABA_ID>/phone_numbers
A list of WhatsApp Business Phone Number nodes and their default fields.
curl \ 'https://graph.facebook.com/v15.0/102289599326934/phone_numbers' \ -H 'Authorization: Bearer EAAJi...'
{ "data" : [ { "code_verification_status" : "VERIFIED", "display_phone_number" : "+1 555-555-5555", "id" : "106853218861309", "quality_rating" : "GREEN", "verified_name" : "Jaspers Market" } ], "paging" : { "cursors" : { "after" : "QVFIU...", "before" : "QVFIU..." } } }
curl GET \
"https://graph.facebook.com/v19.0
/102289599326934/phone_numbers \
?fields=id,is_official_business_account,display_phone_number,verified_name \
&filtering=[{'field':'account_mode','operator':'EQUAL','value':'SANDBOX'}]" \
-H 'Authorization: Bearer EAAJi...'
{ "id" : "106853218861309", "is_official_business_account" : true, "display_phone_number" : "+1 555-555-5555", "verified_name" : "Jaspers Market" }
Reading from this edge will return a JSON formatted result:
{ "
data
": [], "paging
": {}, "summary
": {} }
data
paging
summary
Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=total_count
).
Field | Description |
---|---|
total_count unsigned int32 | The current number of phone numbers that belong to a WhatsApp Business Account |
Error | Description |
---|---|
100 | Invalid parameter |
80008 | There have been too many calls to this WhatsApp Business account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
200 | Permissions error |
190 | Invalid OAuth 2.0 Access Token |
Type | Description |
---|---|
User or System User. | |
curl -i -X POST \
"https://graph.facebook.com/LATEST-VERSION/WHATSAPP-BUSINESS-ACCOUNT-ID/phone_numbers?
cc=COUNTRY-CODE&
phone_number=PHONE-NUMBER&
migrate_phone_number=true&
access_token=USER-ACCESS-TOKEN"
{ "id": "POST-ID" }
phone_numbers
edge from the following paths: Parameter | Description |
---|---|
cc string | Country dial code of the phone number (for example, |
migrate_phone_number boolean | Set to |
phone_number string | Phone number without the country code or plus symbol ( |
preverified_id string | Preverified ID related to this phone number |
verified_name string | Name of the business as it appears in the WhatsApp app or WhatsApp Business app profile. |
id
in the return type.id
: numeric string, Error | Description |
---|---|
100 | Invalid parameter |
200 | Permissions error |
300 | Edit failure |