Graph API Version

WhatsApp Business Account Phone Numbers

Represents phone numbers that belong to a specific WhatsApp Business Account (WABA).

To find the ID of a WhatsApp Business Account (WABA), go to Business Manager > Business Settings > Accounts > WhatsApp Business Accounts. Find the WABA you want to use and click on it. A panel will open up with information about the account, including the ID.

For more information on how to use the API, see WhatsApp Business Management API.

GET calls to /{whats-app-business-account-id}/phone_numbers are now subject to Business Use Case Rate Limits.

Reading

Fetch phone number owned by a WhatsApp Business Account

Example

Graph API Explorer
GET /v12.0/{whats-app-business-account-id}/phone_numbers HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{whats-app-business-account-id}/phone_numbers',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{whats-app-business-account-id}/phone_numbers",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{whats-app-business-account-id}/phone_numbers",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{whats-app-business-account-id}/phone_numbers"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {}, "summary": {} }

paging

For more details about pagination, see the Graph API guide.

summary

Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=total_count).

FieldDescription
total_count
unsigned int32

total_count

Error Codes

ErrorDescription
100Invalid parameter
200Permissions error

Creating

You can make a POST request to phone_numbers edge from the following paths:
When posting to this edge, a WhatsAppBusinessAccountToNumberCurrentStatus will be created.

Parameters

ParameterDescription
cc
string

Country dial code of the phone number (for example, "1")

migrate_phone_number
boolean

Set this field to true for migrating a registered phone number from another WhatsApp Business Account into this WhatsApp Business Account

phone_number
string

Phone number without the country code

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}

Error Codes

ErrorDescription
100Invalid parameter
200Permissions error

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.