그래프 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 요청을 만들 수 있습니다:
이 에지에 게시할 때 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

업데이트 중

이 엔드포인트에서 수행할 수 없는 작업입니다.

삭제 중

이 엔드포인트에서 수행할 수 없는 작업입니다.