图谱 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 /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
    }];
    如果你希望详细了解如何使用图谱 API,请阅读我们的图谱 API 指南

    参数

    参数描述
    code
    string

    QR code or short link ID.

    字段

    从这条连线读取将返回一个 JSON 格式的结果:

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

    data

    WhatsAppBusinessMessageQRDL 节点列表。

    paging

    详细了解分页功能,请见图谱 API 指南

    错误代码

    错误描述
    100Invalid parameter

    创建

    你可以通过下列路径向 message_qrdls 连线发出 POST 请求:
    发布到这个连线会创建 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,
    }

    错误代码

    错误描述
    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 发出 DELETE 请求,将 a WhatsAppBusinessMessageQRDL 与 a WhatsAppBusinessPhoneNumber 取消关联。

    参数

    参数描述
    code
    string

    ID of the QR code or short link.

    必填

    返回类型

    Struct {
    success: bool,
    }

    错误代码

    错误描述
    100Invalid parameter