圖形 API 版本

    Whats App Business Phone Number Message Qrdls

    Represents a collection of QR codes or short links on a WhatsApp Business Phone Number. See QR Codes.

    閱讀中

    Get a list of QR codes or short links on a WhatsApp Business Phone Number.

    範例

    Graph API Explorer
    GET /v21.0/{whats-app-business-phone-number-id}/message_qrdls 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}/message_qrdls',
        '{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}/message_qrdls",
        function (response) {
          if (response && !response.error) {
            /* handle the result */
          }
        }
    );
    /* make the API call */
    new GraphRequest(
        AccessToken.getCurrentAccessToken(),
        "/{whats-app-business-phone-number-id}/message_qrdls",
        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}/message_qrdls"
                                          parameters:params
                                          HTTPMethod:@"GET"];
    [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                          id result,
                                          NSError *error) {
        // Handle the result
    }];
    如果想瞭解如何使用圖形 API,請參閱我們的使用圖形 API 指南

    參數

    參數說明
    code
    string

    QR code or short link ID.

    欄位

    由此關係連線進行的閱讀將回傳 JSON 格式結果:

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

    data

    WhatsAppBusinessMessageQRDL 節點的清單。

    paging

    如需更多有關分頁的詳細資料,請參閱圖形 API 指南

    Error Codes

    錯誤說明
    100Invalid parameter

    建立中

    You can make a POST request to message_qrdls edge from the following paths:
    發佈到此關係連線時,會建立 a WhatsAppBusinessMessageQRDL

    You can also use this endpoint to update an existing QR code or short link by including the code parameter in your request.

    參數

    參數說明
    code
    string

    ID of the QR code or short link to update. Omit if creating a QR code or short link.

    generate_qr_image
    enum {PNG, SVG}

    Indicates QR code or short link image format.

    prefilled_message
    string

    Text that will appear in a new WhatsApp message when the customer triggers the QR code or short link.

    必填

    傳回類型

    Struct {
    code: string,
    prefilled_message: string,
    deep_link_url: uri,
    qr_image_url: uri,
    }

    Error Codes

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

    更新中

    See Creating to update an existing QR code or short link.


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

    刪除中

    你可以向 /{whats_app_business_phone_number_id}/message_qrdls 提出刪除要求,中斷 a WhatsAppBusinessMessageQRDL 和 a WhatsAppBusinessPhoneNumber 的關聯。

    參數

    參數說明
    code
    string

    ID of the QR code or short link.

    必填

    傳回類型

    Struct {
    success: bool,
    }

    Error Codes

    錯誤說明
    100Invalid parameter