إصدار ‏‎Graph API‎‏

    Whats App Business Phone Number Whatsapp Business Profile

    قراءة

    Get a WhatsApp Business Phone Number's business profile data.

    مثال

    Graph API Explorer
    GET /v21.0/{whats-app-business-phone-number-id}/whatsapp_business_profile 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-phone-number-id}/whatsapp_business_profile',
        '{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-phone-number-id}/whatsapp_business_profile",
        function (response) {
          if (response && !response.error) {
            /* handle the result */
          }
        }
    );
    /* make the API call */
    new GraphRequest(
        AccessToken.getCurrentAccessToken(),
        "/{whats-app-business-phone-number-id}/whatsapp_business_profile",
        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-phone-number-id}/whatsapp_business_profile"
                                          parameters:params
                                          HTTPMethod:@"GET"];
    [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                          id result,
                                          NSError *error) {
        // Handle the result
    }];
    إذا كنت تريد التعرف على كيفية استخدام واجهة Graph API، يرجى قراءة ‏دليل استخدام واجهة Graph API‏.

    المعلمات

    لا تحتوي نقطة النهاية هذه على أي معلمات.

    الحقول

    ستؤدي القراءة من عنصر الربط هذا إلى نتيجة بتنسيق JSON:

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

    data

    قائمة عُقد ‏‎WhatsAppBusinessProfileSanitized‎‏.

    paging

    لمزيد من التفاصيل عن تقسيم الصفحات، يرجى الاطلاع على ‏دليل Graph API‏.

    ‎Error Codes‎

    خطأالوصف
    100Invalid parameter
    131000Something went wrong
    131031Business Account locked
    104Incorrect signature
    131057Business Account is in maintenance mode
    80008There have been too many calls to this WhatsApp Business account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
    133010The account is not registered
    200Permissions error
    190Invalid OAuth 2.0 Access Token

    إنشاء

    ‎You can make a POST request to whatsapp_business_profile edge from the following paths:
    ‎When posting to this edge, no Graph object will be created.‎

    المعلمات

    معلمةالوصف
    about
    string

    The business's About text.


    • Maximum 139 characters.
    • Rendered emojis are supported however their unicode values are not. Emoji unicode values must be Java- or JavaScript-escape encoded.
    • Hyperlinks can be included but will not render as clickable links.
    • Markdown is not supported.

    address
    string

    Business address. Maximum 256 characters.

    description
    string

    Business description. Maximum 512 characters.


    • Rendered emojis are supported however their unicode values are not. Emoji unicode values must be Java- or JavaScript-escape encoded.
    • Hyperlinks can be included but will not render as clickable links.
    • Markdown is not supported.

    email
    string

    Business email address. Must be in valid email format. Maximum 128 characters.

    messaging_product
    enum {WHATSAPP}

    Set to whatsapp.

    مطلوب
    profile_picture_handle
    string

    Profile picture media asset handle, generated via the Resumable Upload API.

    vertical
    enum {OTHER, AUTO, BEAUTY, APPAREL, EDU, ENTERTAIN, EVENT_PLAN, FINANCE, GROCERY, GOVT, HOTEL, HEALTH, NONPROFIT, PROF_SERVICES, RETAIL, TRAVEL, RESTAURANT, ALCOHOL, ONLINE_GAMBLING, PHYSICAL_GAMBLING, OTC_DRUGS}

    Business category. These values map to the following strings, which are displayed in the business profile in the WhatsApp client.

    • ALCOHOL = Alcoholic Beverages
    • APPAREL = Clothing and Apparel
    • AUTO = Automotive
    • BEAUTY = Beauty, Spa and Salon
    • EDU = Education
    • ENTERTAIN = Entertainment
    • EVENT_PLAN = Event Planning and Service
    • FINANCE = Finance and Banking
    • GOVT = Public Service
    • GROCERY = Food and Grocery
    • HEALTH = Medical and Health
    • HOTEL = Hotel and Lodging
    • NONPROFIT = Non-profit
    • ONLINE_GAMBLING = Online Gambling & Gaming
    • OTC_DRUGS = Over-the-Counter Drugs
    • OTHER = Other
    • PHYSICAL_GAMBLING = Non-Online Gambling & Gaming (E.g. Brick and mortar)
    • PROF_SERVICES = Professional Services
    • RESTAURANT = Restaurant
    • RETAIL = Shopping and Retail
    • TRAVEL = Travel and Transportation

    websites
    array<URI>

    URLs associated with the business, such as a website, Facebook Page, or Instagram profile. Strings must be prefixed with http:// or https://.


    • Maximum of 2 strings.
    • Maximum 256 characters per string.

    ‎Return Type‎

    ‎This endpoint supports ‎read-after-write‎ and will read the node to which you POSTed.‎
    Struct {
    success: bool,
    }

    ‎Error Codes‎

    خطأالوصف
    100Invalid parameter
    131000Something went wrong
    131031Business Account locked
    131009Parameter value is not valid
    368The action attempted has been deemed abusive or is otherwise disallowed
    133010The account is not registered
    200Permissions error

    جارٍ التحديث

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

    جارٍ الحذف

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