Phiên bản API Đồ thị

    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.

    Đọc

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

    Ví dụ

    Graph API Explorer
    GET /v19.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
    }];
    Nếu bạn muốn tìm hiểu cách sử dụng API Đồ thị, hãy đọc Hướng dẫn sử dụng API Đồ thị của chúng tôi.

    Thông số

    Thông sốMô tả
    code
    string

    QR code or short link ID.

    Trường

    Đọc từ cạnh này sẽ trả về một kết quả JSON đã định dạng:

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

    data

    Danh sách nút WhatsAppBusinessMessageQRDL.

    paging

    Để biết thêm chi tiết về chia trang, hãy xem hướng dẫn về API Đồ thị.

    Mã lỗi

    LỗiMô tả
    100Invalid parameter
    104Incorrect signature

    Tạo

    Bạn có thể tạo yêu cầu POST đến cạnh message_qrdls từ các đường dẫn sau:
    Khi đăng lên cạnh này, hệ thống sẽ tạo 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.

    Thông số

    Thông sốMô tả
    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.

    Bắt buộc

    Kiểu trả về

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

    Mã lỗi

    LỗiMô tả
    100Invalid parameter
    200Permissions error
    300Edit failure

    Cập nhật

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


    Bạn không thể thực hiện thao tác này trên điểm cuối này.

    Xóa

    Bạn có thể hủy liên kết a WhatsAppBusinessMessageQRDL khỏi a WhatsAppBusinessPhoneNumber bằng cách thực hiện yêu cầu DELETE đến /{whats_app_business_phone_number_id}/message_qrdls.

    Thông số

    Thông sốMô tả
    code
    string

    ID of the QR code or short link.

    Bắt buộc

    Kiểu trả về

    Struct {
    success: bool,
    }

    Mã lỗi

    LỗiMô tả
    100Invalid parameter