0

Without min api version -

const message = new RichMediaMessage(SAMPLE_RICH_MEDIA);

With min api version -

const message = new RichMediaMessage(SAMPLE_RICH_MEDIA, null, [], undefined, undefined, null, 7);

Both doesn't work while sending

response.send(message);

The error log is like below enter image description here

Normal text message works well

const message = new TextMessage('hi');

response.send(message);

enter image description here

WHY
  • 258
  • 1
  • 8

1 Answers1

2

I have found the issue.
In their api documentation,
https://developers.viber.com/docs/api/nodejs-bot-api/#RichMediaMessage

"ButtonsGroupRows": 2 (this should be => 4+1=5)

Changing "2" to "5" solved it.

WHY
  • 258
  • 1
  • 8