Search code examples
viber

Is it possible to obtain a history of messages via Viber API?


According to the API documentation (http://developers.viber.com/api/rest-bot-api/index.html#viber-rest-api), there are not many functions available. I would like to clarify is there a way to get the history of messages using the API?

Update Because of this API is designed for creating bots, is there an approach to writing custom Viber clients? For instance, Telegram has API for this purpose: https://core.telegram.org/methods


Solution

  • There is no API for you to obtain messages history from Viber but you can create list with history of received and sent messages on your side.

    You can create custom service (client) in various technologies but here is example using Java with Spring boot

    In this example you could create list in SpringEchoBot class. List would store all messagees recivied in onMessageReceived method and returned with response.send().

    So in short its up to you to create storage for message history and to manage it as you like.