إصدار ‏‎Graph API‎‏

Whats App Business Account Phone Numbers

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.

قراءة

لا يمكنك تنفيذ هذه العملية في نقطة النهاية هذه.

إنشاء

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:
‎When posting to this edge, a WhatsAppBusinessPhoneNumber will be created.‎

المعلمات

معلمةالوصف
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.

‎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‎

خطأالوصف
100Invalid parameter
200Permissions error

جارٍ التحديث

لا يمكنك تنفيذ هذه العملية في نقطة النهاية هذه.

جارٍ الحذف

لا يمكنك تنفيذ هذه العملية في نقطة النهاية هذه.