Telegram’s MTProto authentication requires a phone number paired with a one-time confirmation code. This endpoint handles both steps of that flow: the first call triggers Telegram to deliver a confirmation code to your Telegram app; the second call submits that code to complete authentication. Once sign-in succeeds, the Telethon session is persisted to S3 so that future requests resume the authorized session without re-authenticating.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.
Endpoint
How the Two-Step Flow Works
Step 1 — Request the confirmation code
Send a request body containing only
phone (omit password). The server calls client.sign_in(phone), stores the returned phone_code_hash internally, and returns HTTP 206 Partial Content. Telegram immediately sends a confirmation code to the Telegram app associated with that phone number.Step 2 — Submit the confirmation code
Send a second request with both
phone and password set to the one-time code you received in your Telegram app. The server calls client.sign_in(phone, password, phone_code_hash=...), persists the authenticated session to S3, and returns HTTP 200 OK.Request Body
Your Telegram account phone number in international format (e.g.,
+1234567890). Required for both step 1 and step 2.The one-time confirmation code sent by Telegram to your app. Omit this field in step 1 to trigger the code to be sent. Provide it in step 2 to complete authentication.
Response
There is no response body on success. The HTTP status code alone signals which stage was reached.Status Codes
| Status | Description |
|---|---|
| 200 OK | Sign-in complete, or already authorized |
| 206 Partial Content | Code sent to Telegram app; submit code in step 2 |