Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive message is not working whatsapp. #94

Open
amithit opened this issue Oct 8, 2021 · 1 comment
Open

Interactive message is not working whatsapp. #94

amithit opened this issue Oct 8, 2021 · 1 comment

Comments

@amithit
Copy link

amithit commented Oct 8, 2021

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

@aodinok
Copy link
Contributor

aodinok commented Oct 9, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants