3

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

4

1 回答 1

2

没有 API 可让您从 Viber 获取消息历史记录,但您可以创建包含接收和发送消息历史记录的列表。

您可以使用各种技术创建自定义服务(客户端),但这里是使用Java 和 Spring Boot的示例

SpringEchoBot在此示例中,您可以在类中创建列表。List 将存储在onMessageReceived方法中接收并返回的所有消息response.send()

因此,简而言之,您可以为消息历史创建存储空间并根据需要进行管理。

于 2017-04-26T09:48:58.243 回答