This library is deprecated. No new development will be taking place. We recommend that you use either NodeJS, Python or REST API.
Use this library to develop a bot for Viber platform. The library is available on GitHub as well as maven central.
This library is released under the terms of the Apache 2.0 license. See License for more information.
This library is released on maven central.
All public APIs are documented with JavaDocs which can be found in the GitHub repository.
We’ve created two sample projects to help you get started:
You can chose to use any web server or framework you like. All you need to do is call the API with:
The Viber bot library is thread-safe and highly concurrent. You do not have to worry about synchronizing anything.
All calls to ViberBot#incoming()
go through a BlockingQueue
, and ordering is retained.
All I/O calls are directly executed on the same thread they were initially called on.
Yes. You can pass a system property to control the I/O thread pool:
com.viber.bot.executor.strategy=[DIRECT|THREAD]
(default is DIRECT)
com.viber.bot.executor.threads=N
(default is getRuntime().availableProcessors()
)
Well funny you ask. Yes we do. But a word of warning - messages sent to your router callback will also be emitted to the ViberBot#onMessageReceived
event.
Join the conversation on Gitter.