Skip to content

Interactive message is not working whatsapp. #94

@amithit

Description

@amithit

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' } ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions