Versão Graph API

Whats App Business Message QRDL

Represents a WhatsApp QR code or short link. See QR Codes.

Leitura

Cannot be queried directly. Use the WhatsApp Business Phone Number > Message Qrdls endpoint to get fields on a QR code or short link.

Exemplo

Graph API Explorer
GET v21.0/...?fields={fieldname_of_type_WhatsAppBusinessMessageQRDL} 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(
    '...?fields={fieldname_of_type_WhatsAppBusinessMessageQRDL}',
    '{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(
    "...?fields={fieldname_of_type_WhatsAppBusinessMessageQRDL}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "...?fields={fieldname_of_type_WhatsAppBusinessMessageQRDL}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"...?fields={fieldname_of_type_WhatsAppBusinessMessageQRDL}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Se quiser saber como usar a Graph API, leia nosso guia sobre Como usar a Graph API.

Parâmetros

Este ponto de extremidade não tem nenhum parâmetro.

Campos

CampoDescrição
code
string

QR code or short link ID.

deep_link_url
string

QR code or short link deep link URL.

prefilled_message
string

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

qr_image_url
string

QR code or short link image URL. When requested, must designate the image format you want returned. Values can be PNG or SVG. Example:


?fields=qr_image_url.format(SVG)

Criando

You can make a POST request to message_qrdls edge from the following paths:
When posting to this edge, a WhatsAppBusinessMessageQRDL will be created.

Parâmetros

ParâmetroDescrição
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.

Obrigatório

Return Type

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

Error Codes

ErroDescrição
300Edit failure
100Invalid parameter
200Permissions error

Atualizando

Não é possível executar esta operação neste ponto de extremidade.

Excluindo

You can dissociate a WhatsAppBusinessMessageQRDL from a WhatsAppBusinessPhoneNumber by making a DELETE request to /{whats_app_business_phone_number_id}/message_qrdls.

Parâmetros

ParâmetroDescrição
code
string

ID of the QR code or short link.

Obrigatório

Return Type

Struct {
success: bool,
}

Error Codes

ErroDescrição
100Invalid parameter