This guide walks you through obtaining Telegram API credentials, building and running the service with Docker, completing the two-step sign-in flow, and making your first channel and message requests. By the end you will have a running Telegram Connector instance, an authenticated session, and a list of your Telegram channels returned from the API.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/OPENNOVA2026/telegram-connector/llms.txt
Use this file to discover all available pages before exploring further.
Obtain Telegram API credentials
Navigate to https://my.telegram.org/apps and log in with the phone number associated with your Telegram account. Create a new application — Telegram will issue an
api_id (integer) and an api_hash (string) that identify your client to the MTProto network.Create your .env file
In the root of the project, create a The service calls S3 on every startup and shutdown to load and persist the Telethon session. The AWS credentials are therefore required for the service to start successfully. See Configuration → Environment for the full variable reference.
.env file with your credentials and S3 session storage configuration:Build the Docker image
From the project root, build the production image:The Dockerfile uses a multi-stage build: a
builder stage installs dependencies with Poetry, and the prod stage copies only the installed packages and application source into a minimal python:3.10.16-slim-bullseye image.Run the container
Start the container with the environment file and a volume mount:
-p 5004:5000maps port 5004 on your host to the container’s internal port 5000, where Uvicorn is listening.-v .:/appmounts your project directory into the container so that your.envfile is picked up at runtime.
StringSession and waits for sign-in.Sign in — send your phone number
POST to The service returns HTTP 206 Partial Content. This means Telegram has dispatched a one-time code to your Telegram app (or via SMS). Do not include a
/sign_in with only your phone number (in E.164 format):password field in this first request.Sign in — submit the code
Open your Telegram app, note the code you received, and send it as the The
password field:password field carries the code Telegram sent to your app — it is not your account password. A successful authentication returns HTTP 200 and the session is immediately persisted to S3 via SessionManager.Verify authorization
Confirm the session is active:Expected response:If this returns
false, repeat the sign-in steps — the session was not established correctly.Next Steps
API Reference
Explore full request and response schemas for every endpoint, including sign-in, channel management, and message retrieval.
Configuration
Review all environment variables — AWS credentials, Sentry DSN, session name, and more.
Session Persistence
Understand how Telethon StringSessions are serialised and stored in S3 so your authentication survives container restarts.
Deployment
Learn about the production and development Docker targets, environment-specific configuration, and container best practices.