TelegramBots is a Java library for building bots against the Telegram Bots API. It supports webhook delivery and long-polling updates.
Overview
TelegramBots gives Java developers a straightforward way to implement Telegram bots. It wraps the Telegram bot API so applications can send messages, handle commands, and process updates without low-level HTTP details.
Both webhook and GetUpdates long-polling modes are supported; project documentation notes a preference for long polling in many setups. Example bots in a separate project illustrate custom keyboards, basic messages, file uploads, inline queries, and webhook configuration.
The library targets typical Java builds and integrates with common Java packaging and Spring Boot workflows mentioned in project topics. Documentation and a community chat channel are linked for usage questions.
It is a dependency you add to your own Java application; it does not run as a standalone server product by itself.
Key features
- Telegram Bots API wrapper
- Webhook and long polling
- Example bot patterns
- Custom keyboard support
- File send and upload helpers
- Inline query support
- Maven and JitPack distribution
- Spring Boot friendly usage
Use cases
- Java Telegram notification bots
- Interactive command-driven bots
- Webhook-driven bot backends
- File and inline query bots
- Learning Telegram bot APIs in Java