devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click! Two engines: chromium-based WEBJS and pure-websocket NOWEB
https://waha.devlike.pro/
Apache License 2.0
878 stars 273 forks source link

/api/sendTextButtons - Buttons not received on whatsapp despite of success response from API #157

Closed ehussain closed 1 year ago

ehussain commented 1 year ago

Hello,

I am making this api call to /api/sendTextButtons end point. SessionID and sender receiver phone number is correct. Normal message sending works fine. However buttons messages are not sent.

{
  "chatId": "XXXXXXXXX@c.us",
  "title": "Good morning",
  "footer": "Please pick your choice",
  "buttons": [
    {
      "id": "btn_1",
      "text": "Button 1"
    },
    {
      "id": "btn_2",
      "text": "Button 2"
    }
  ],
  "session": "15511-01"
}

Here is response received.

{
  "_data": {
    "id": {
      "fromMe": true,
      "remote": {
        "server": "c.us",
        "user": "XXXXXXXXXX",
        "_serialized": "XXXXXXXXXX@c.us"
      },
      "id": "3EB0F54C40B86B52743DE8",
      "_serialized": "true_XXXXXXXXXX@c.us_3EB0F54C40B86B52743DE8"
    },
    "body": "",
    "type": "chat",
    "t": 1691469928,
    "from": {
      "server": "c.us",
      "user": "XXXXXXXXXX",
      "_serialized": "XXXXXXXXXX@c.us"
    },
    "to": {
      "server": "c.us",
      "user": "XXXXXXXXXX",
      "_serialized": "XXXXXXXXXX@c.us"
    },
    "self": "out",
    "ack": 0,
    "isNewMsg": true,
    "star": false,
    "kicNotified": false,
    "caption": "",
    "isFromTemplate": false,
    "title": "Good morning",
    "pollInvalidated": false,
    "isSentCagPollCreation": false,
    "latestEditMsgKey": null,
    "latestEditSenderTimestampMs": null,
    "mentionedJidList": [],
    "groupMentions": [],
    "footer": "Please pick your choice",
    "isVcardOverMmsDocument": false,
    "isForwarded": false,
    "hasReaction": false,
    "ephemeralSettingTimestamp": 1689311926,
    "disappearingModeInitiator": "chat",
    "productHeaderImageRejected": false,
    "lastPlaybackProgress": 0,
    "isDynamicReplyButtonsMsg": true,
    "dynamicReplyButtons": [
      {
        "buttonId": "btn_1",
        "buttonText": {
          "displayText": "Button 1"
        },
        "type": 1
      },
      {
        "buttonId": "btn_2",
        "buttonText": {
          "displayText": "Button 2"
        },
        "type": 1
      }
    ],
    "isMdHistoryMsg": false,
    "stickerSentTs": 0,
    "isAvatar": false,
    "lastUpdateFromServerTs": 0,
    "requiresDirectConnection": null,
    "invokedBotWid": null
  },
  "id": {
    "fromMe": true,
    "remote": {
      "server": "c.us",
      "user": "XXXXXXXXXX",
      "_serialized": "XXXXXXXXXX@c.us"
    },
    "id": "3EB0F54C40B86B52743DE8",
    "_serialized": "true_XXXXXXXXXX@c.us_3EB0F54C40B86B52743DE8"
  },
  "ack": 0,
  "hasMedia": false,
  "body": "",
  "type": "chat",
  "timestamp": 1691469928,
  "from": "XXXXXXXXXX@c.us",
  "to": "XXXXXXXXXX@c.us",
  "deviceType": "android",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": false,
  "isStarred": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "hasReaction": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "title": "Good morning",
  "dynamicReplyButtons": [
    {
      "buttonId": "btn_1",
      "buttonText": {
        "displayText": "Button 1"
      },
      "type": 1
    },
    {
      "buttonId": "btn_2",
      "buttonText": {
        "displayText": "Button 2"
      },
      "type": 1
    }
  ]
}
allburov commented 1 year ago

Hi! Yes, it's not supported :( https://github.com/devlikeapro/whatsapp-http-api/issues/118 We'll work on poll buttons instead as a replacement for those buttons https://github.com/devlikeapro/whatsapp-http-api/issues/131