Web Adapters
Written by
Updated at June 8, 2026
Adapters connect the engine to your HTTP framework. They register POST, map requests to WebRequest, and map engine responses back to framework types.
Note
First webhook? First webhook picks FastAPI or aiohttp for you. Return here to compare options or plan a custom integration.
Choose an adapter
| Adapter | Framework | Guide |
|---|---|---|
FastAPIAdapter |
FastAPI | FastAPI |
AiohttpAdapter |
aiohttp.web.Application |
aiohttp |
Custom WebAdapter |
Any async framework | Custom adapter |
Match the framework your application already uses. If there is no preference, FastAPI is the shortest path.
Adapter boundary
The adapter handles HTTP types only. It does not resolve bots, verify security, or call the dispatcher — that stays in the engine.
| Adapter does | Adapter does not |
|---|---|
Register POST on route.path |
Parse Telegram updates for business logic |
Expose client_ip, headers, path/query params |
Call setWebhook |
| Build JSON and payload responses | Choose which bot handles the update |
Full layer breakdown: Dispatch modes.
Custom framework
Shipped adapters are working references, not templates to copy verbatim. See Custom integrations.
Previous
Next