Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

sendButtons on Meta Cloud API channel drops description and footer, no header/footer sent to WhatsApp

Open Beginner friendly
#2,723 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
api, backend

Research direction

Start in src/api/integrations/channel/meta/whatsapp.business.service.ts at buttonMessage(), then trace how sendMessageWithTyping() builds the Meta Graph API request. Compare the buttons path with listMessage() and verify that title, description, and footer reach the expected interactive header, body, and footer fields while existing button handling remains intact.

Written by the indexing model from the issue text.

Description

Describe the bug

On the Meta Cloud API channel (whatsapp.business.service.ts), POST /message/sendButtons/{instance} silently drops the description and footer fields. Only title is forwarded to WhatsApp — as the interactive message's body.text, with no header and no footer at all.

This means a request like:

{
  "number": "[email protected]",
  "title": "Titulo",
  "description": "Hola, elige una opción",
  "footer": "Mi empresa",
  "buttons": [
    { "type": "reply", "displayText": "opcion a", "id": "reply_1" },
    { "type": "reply", "displayText": "opcion b", "id": "reply_2" }
  ]
}

is delivered to Meta with description and footer completely discarded, and only "Titulo" showing up on WhatsApp, with no body text and no footer below the buttons.

Root cause

In src/api/integrations/channel/meta/whatsapp.business.service.ts, buttonMessage():

public async buttonMessage(data: SendButtonsDto) {
  const embeddedMedia: any = {};

  const btnItems = {
    text: data.buttons.map((btn) => btn.displayText),
    ids: data.buttons.map((btn) => btn.id),
  };

  if (!arrayUnique(btnItems.text) || !arrayUnique(btnItems.ids)) {
    throw new BadRequestException('Button texts cannot be repeated', 'Button IDs cannot be repeated.');
  }

  return await this.sendMessageWithTyping(
    data.number,
    {
      text: !embeddedMedia?.mediaKey ? data.title : undefined,   // only data.title is used
      buttons: data.buttons.map((button) => {
        return {
          type: 'reply',
          reply: {
            title: button.displayText,
            id: button.id,
          },
        };
      }),
      [embeddedMedia?.mediaKey]: embeddedMedia?.message,
    },
    { ... },
  );
}

data.description and data.footer are never read anywhere in this function. Then, in sendMessageWithTyping(), when building the actual Graph API request:

if (message['buttons']) {
  content = {
    messaging_product: 'whatsapp',
    recipient_type: 'individual',
    to: number.replace(/\D/g, ''),
    type: 'interactive',
    interactive: {
      type: 'button',
      body: {
        text: message['text'] || 'Select',   // this is data.title
      },
      action: {
        buttons: message['buttons'],
      },
      // no header, no footer
    },
  };
  ...
}

No header and no footer key is ever added to interactive, even though Meta's Cloud API supports both for interactive.type = "button" messages.

For comparison, listMessage() in the same file maps all four fields correctly:

interactive: {
  type: 'list',
  header: { type: 'text', text: message['listMessage']['title'] },
  body: { text: message['listMessage']['description'] },
  footer: { text: message['listMessage']['footerText'] },
  action: { button: message['listMessage']['buttonText'], sections: message['listMessage']['sections'] },
},

So sendList on this same channel works as documented — this is specifically a gap in the buttons path.

To Reproduce

  1. Configure an instance with integration: WHATSAPP-BUSINESS (Meta Cloud API).
  2. Call POST /message/sendButtons/{instance} with title, description, footer, and 1-3 reply buttons.
  3. Observe on the recipient's WhatsApp: only the title text and the buttons are shown. description and footer never appear.

Expected behavior

description should populate interactive.body.text and title should populate interactive.header.text (matching how listMessage() handles the equivalent fields), and footer should populate interactive.footer.text, consistent with what Meta's Cloud API supports for interactive.type = "button" messages.

Environment

  • Evolution API version: 2.3.7 (confirmed present in this exact form in the 2.3.7 tag; also present on the current default branch)
  • Channel/integration: WHATSAPP-BUSINESS (Meta Cloud API)
  • File: src/api/integrations/channel/meta/whatsapp.business.service.ts, function buttonMessage()
Dominant language
TypeScript
Stars
9.7k
Forks
7.3k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evolution-foundation/evolution-api

All issues in evolution-foundation/evolution-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.