グラフAPIバージョン

Whats App Business Account Phone Numbers

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

WhatsApp BusinessアカウントのIDは、[ビジネスマネージャ] > [ビジネス設定] > [アカウント] > [WhatsApp Businessアカウント]で確認できます。使用するアカウントを見つけてクリックします。パネルが開き、IDなどのアカウント情報を確認できます。

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"
}
phone_numbersのエッジにPOSTリクエストを以下のパスで送信できます:
このエッジにPOSTする場合、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,
}

エラーコード

エラー詳細
100Invalid parameter
200Permissions error

更新中…

このエンドポイントではこの操作を実行できません。

削除中です

このエンドポイントではこの操作を実行できません。