messagebird/messagebird-nodejs

Interactive message is not working whatsapp.

Opened this issue · 1 comments

const messagebird = require('messagebird')('<API_KEY>', null, [
'ENABLE_CONVERSATIONSAPI_WHATSAPP_SANDBOX',
]);

      messagebird.conversations.reply(
        '<channel_id>',
        {
          type: 'interactive',
          content: {
                "interactive": {
                    "type": "list",
                    "header": {
                        "type": "text",
                        "text": "What you would like to do buy today?"
                    },
                    "body": {
                        "text": "To begin, tap Main Menu and choose from one of the following actions"
                    },
                    "action": {
                        "button": "Main Menu",
                        "sections": [
                            {
                                "title": "content-title-here",
                                "rows": [
                                    {
                                        "id": "unique-row-identifier-1",
                                        "title": "Buy bundles"
                                    }
                                ]
                            },
                            {
                                "title": "content-title-here",
                                "rows": [
                                    {
                                        "id": "unique-row-identifier-2",
                                        "title": "Buy airtime",
                                        "description": "optional description"
                                    }
                                ]
                            }
                        ]
                    }
                
            }
          },
        },
        function(err, response) {
          if (err) {
            return console.log(err);
          }
          console.log(response);
        },
      );

response

Error: api error(s): Internal server error (code: 99)
at IncomingMessage. (/home/amit/messageGateway/bitbucket/new/channel-adapter/app/node_modules/messagebird/lib/messagebird.js:169:21)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1184:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
statusCode: 500,
errors: [ { code: 99, description: 'Internal server error' } ]
}

Hi @amithit
Are you trying to send interactive to WhatsAppSandbox channel? If yes - interactive messages are not supported for WhatsApp Sandbox.
If not - did you try sending it with CURL? Does it work?