圖形 API 版本

Whats App Business Account Phone Numbers

Represents a collection of business phone numbers associated with a WhatsApp Business Account (WABA).

若要尋找 WhatsApp Business 帳號的編號,請前往企業管理平台 > 企業管理平台設定 > 帳號 > WhatsApp Business 帳號。找到您要使用的帳號並點擊。這會開啟一個面板,其中會顯示帳號的相關資訊,包含編號。

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

閱讀中

你無法在此端點執行此操作。

建立中

Create a business phone number on a WhatsApp Business Account.

Requirements

Sample Request

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"
GraphRequest request = GraphRequest.newPostRequest(
  accessToken,
  "/WHATSAPP-BUSINESS-ACCOUNT-ID/phone_numbers",
  new JSONObject("{\"cc\":\"COUNTRY-CODE\",\"phone_number\":\"PHONE-NUMBER\",\"migrate_phone_number\":true}"),
  new GraphRequest.Callback() {
    @Override
    public void onCompleted(GraphResponse response) {
      // Insert your code here
    }
});
request.executeAsync();
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
    initWithGraphPath:@"/WHATSAPP-BUSINESS-ACCOUNT-ID/phone_numbers"
           parameters:@{ @"cc": @"COUNTRY-CODE",@"phone_number": @"PHONE-NUMBER",@"migrate_phone_number": @"true",}
           HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
    // Insert your code here
}];

Sample Response

{
  "id": "POST-ID"
}
You can make a POST request to phone_numbers edge from the following paths:
發佈到此關係連線時,會建立 a WhatsAppBusinessPhoneNumber

參數

參數說明
cc
string

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

migrate_phone_number
boolean

Set to true to migrate a registered WhatsApp Business Phone Number from one WhatsApp Business Account to another.

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 的節點。
Struct {
id: numeric string,
}

Error Codes

錯誤說明
100Invalid parameter
200Permissions error
104Incorrect signature
300Edit failure

更新中

你無法在此端點執行此操作。

刪除中

你無法在此端點執行此操作。