Telegram Passport Manual
Telegram Passport is a unified authorization method for services that require personal identification. Users can upload their documents once, then instantly share their data with services that require real-world ID (finance, ICOs, etc.). Telegram doesn’t have access to the users’ personal information thanks to end-to-end encryption.
Overview
From the perspective of a service that requires real-world ID, the process looks like this:
- A user presses «Log in with Telegram» on your website or in your app.
- You request the data you need.
- The user accepts your privacy policy and agrees to share their data.
- The user’s Telegram app downloads and decrypts the data you requested from the end-to-end encrypted storage on Telegram.
- If some of the data you requested is missing, the user can add it to their Telegram Passport at this point.
- The user’s app encrypts the data with your public key and sends it to you.
- You decrypt the data, check it for errors and re-request any missing or invalid information.
- You sign the user up for your service. Tada!
Check out this example to see Telegram Passport in action.
To learn more about Telegram Passport from the perspective of a user, please see this blog post and the technical MTProto documentation. See this page if you’re interested in encryption algorithms used on Telegram’s side.
Recent changes
August 25, 2018
Telegram Passport 1.1 (blog post)
- Added support for requesting several documents of one type. See the new objects PassportScope, PassportScopeElement, PassportScopeElementOneOfSeveral and PassportScopeElementOne.
- Added support for middle names.
- Added support for requesting certified English translations for documents (see Fields; new field translation also added to the SecureValue object). Note: Please only request translations after you have received a valid document that requires one.
- Added support for requesting names in the language of the user’s country of residence (if other than English). New fields first_name_native, last_name_native and middle_name_native added to the PersonalDetails object.
- Replaced the payload parameter with the new parameter nonce, which serves the same function, to make the purpose more obvious (see Request Parameters and the Credentials object).
- Updated the example page to support the new functionality.
Setting Up Telegram Passport
To integrate Telegram Passport into your login or verification flow, you need a working Telegram bot (see this page for information on how to get one).
To request data from Telegram Passport users, your bot will need to generate a pair of encryption keys.
Generating a private key
First, use a console to generate a private key:
WARNING: Keep your private key SECRET!
Generating your public key
Then use the console to print the corresponding public key:
Use the /setpublickey command with @BotFather to connect this public key with your bot.
Privacy Policy
Add a link to your Privacy Policy by using the /setprivacypolicy command. Users will see this link when offered to authorize you to access their data.
Requesting Information
To request information stored in a Telegram Passport, use one of these SDKs:
Request Parameters
Use the following parameters to request information with the SDK:
| Parameters | Type | Required |
| bot_id | Integer | Yes |
| scope | PassportScope | Yes |
| public_key | String | Yes |
| nonce | String | Yes |
PassportScope
This object represents the data to be requested.
| Field | Type | Description |
| data | Array of PassportScopeElement | List of requested elements, each type may be used only once in the entire array of PassportScopeElement objects |
| v | Integer | Scope version, must be 1 |
PassportScopeElement
This object represents a requested element, should be one of:
-
— use to request any one of the documents included in the scope. – use to request one particular document.
PassportScopeElementOneOfSeveral
This object represents several elements one of which must be provided.
| Field | Type | Description |
| one_of | Array of PassportScopeElementOne | List of elements one of which must be provided; must contain either several of “passport”, “driver_license”, “identity_card”, “internal_passport” or several of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration” |
| selfie | Boolean | Optional. Use this parameter if you want to request a selfie with the document from this list that the user chooses to upload. |
| translation | Boolean | Optional. Use this parameter if you want to request a translation of the document from this list that the user chooses to upload. Note: We suggest to only request translations after you have received a valid document that requires one. |
PassportScopeElementOne
This object represents one particular element that must be provided. If no options are needed, String can be used instead of this object to specify the type of the element.
| Field | Type | Description |
| type | String | Element type. One of «personal_details», «passport», «driver_license», «identity_card», «internal_passport», «address», «utility_bill», «bank_statement», «rental_agreement», «passport_registration», «temporary_registration», «phone_number», «email» |
| selfie | Boolean | Optional. Use this parameter if you want to request a selfie with the document as well. Available for «passport», «driver_license», «identity_card» and «internal_passport» |
| translation | Boolean | Optional. Use this parameter if you want to request a translation of the document as well. Available for «passport», «driver_license», «identity_card», «internal_passport», «utility_bill», «bank_statement», «rental_agreement», «passport_registration» and «temporary_registration». Note: We suggest to only request translations after you have received a valid document that requires one. |
| native_names | Boolean | Optional. Use this parameter to request the first, last and middle name of the user in the language of the user’s country of residence. Available for «personal_details» |
You can also use the special type «id_document» as an alias for one of «passport», «driver_license», «identity_card» and the special type «address_document» as an alias for one of «utility_bill», «bank_statement», «rental_agreement». So <"type":"id_document",selfie:true>is equal to <"one_of":["passport","driver_license","identity_card"],selfie:true>.
Fields
Your bot can request personal details, one or several types of identity document, residential address, one or several types of proof of address document, a phone number, or an email address. You can also request optional selfies with the document and certified English translations of the document. This is just a list of data types that can be requested, and the encrypted objects that will contain such data.
Note: We suggest to only request English translations after you have received a valid document that requires one.
| Name | Key | Type | Description |
|---|---|---|---|
| personal_details | data | PersonalDetails | Personal Details |
| passport | data | IdDocumentData | Passport |
| front_side | PassportFile | ||
| selfie | Optional. PassportFile | ||
| translation | Optional. Array of PassportFile | ||
| internal_passport | data | IdDocumentData | Internal Passport |
| front_side | PassportFile | ||
| selfie | Optional. PassportFile | ||
| translation | Optional. Array of PassportFile | ||
| driver_license | data | IdDocumentData | Driver License |
| front_side | PassportFile | ||
| reverse_side | PassportFile | ||
| selfie | Optional. PassportFile | ||
| translation | Optional. Array of PassportFile | ||
| identity_card | data | IdDocumentData | Identity Card |
| front_side | PassportFile | ||
| reverse_side | PassportFile | ||
| selfie | Optional. PassportFile | ||
| translation | Optional. Array of PassportFile | ||
| address | data | ResidentialAddress | Address |
| utility_bill | files | Array of PassportFile | Utility Bill |
| translation | Optional. Array of PassportFile | ||
| bank_statement | files | Array of PassportFile | Bank Statement |
| translation | Optional. Array of PassportFile | ||
| rental_agreement | files | Array of PassportFile | Rental Agreement |
| translation | Optional. Array of PassportFile | ||
| passport_registration | files | Array of PassportFile | Registration Page in the Internal Passport |
| translation | Optional. Array of PassportFile | ||
| temporary_registration | files | Array of PassportFile | Temporary Registration |
| translation | Optional. Array of PassportFile | ||
| phone_number | String | Phone number | |
| String |
PersonalDetails
This object represents personal details.
| Field | Type | Description |
| first_name | String | First Name |
| last_name | String | Last Name |
| middle_name | String | Optional. Middle Name |
| birth_date | String | Date of birth in DD.MM.YYYY format |
| gender | String | Gender, male or female |
| country_code | String | Citizenship (ISO 3166-1 alpha-2 country code) |
| residence_country_code | String | Country of residence (ISO 3166-1 alpha-2 country code) |
| first_name_native | String | First Name in the language of the user’s country of residence |
| last_name_native | String | Last Name in the language of the user’s country of residence |
| middle_name_native | String | Optional. Middle Name in the language of the user’s country of residence |
ResidentialAddress
This object represents a residential address.
| Field | Type | Description |
| street_line1 | String | First line for the address |
| street_line2 | String | Optional. Second line for the address |
| city | String | City |
| state | String | Optional. State |
| country_code | String | ISO 3166-1 alpha-2 country code |
| post_code | String | Address post code |
IdDocumentData
This object represents the data of an identity document.
| Field | Type | Description |
| document_no | String | Document number |
| expiry_date | String | Optional. Date of expiry, in DD.MM.YYYY format |
PassportFile
This object represents a PassportFile related to a document. The file is up to 10 MB in size and in the .jpg format.
Receiving information
When the user confirms your request by pressing the «Authorize» button, the Bot API sends an Update with the field passport_data to the bot that contains encrypted Telegram Passport data.
Note that all base64-encoded fields should be decoded before use.
Decrypting data
To decrypt the received data, first, decrypt the credentials contained in EncryptedCredentials.
Decrypt the credentials secret ( secret field in EncryptedCredentials) using your private key (set OAEP padding option, e.g. OPENSSL_PKCS1_OAEP_PADDING in PHP)
Use this secret and the credentials hash ( hash field in EncryptedCredentials) to calculate credentials_key and credentials_iv as described below:
Decrypt the credentials data ( data field in EncryptedCredentials) by AES256-CBC using these credentials_key and credentials_iv. IMPORTANT: At this step, make sure that the credentials hash is equal to SHA256( credentials_data )
Credentials data is padded with 32 to 255 random padding bytes to make its length divisible by 16 bytes. The first byte contains the length of this padding (including this byte). Remove the padding to get the data.
Note that all hashes represent as raw binary data, not hexits
Credentials
Credentials is a JSON-serialized object.
| Field | Type | Description |
| secure_data | SecureData | Credentials for encrypted data |
| nonce | String | Bot-specified nonce |
IMPORTANT: Make sure that the nonce is the same as was passed in the request.
SecureData
This object represents the credentials required to decrypt encrypted data. All fields are optional and depend on fields that were requested.
| Field | Type | Description |
| personal_details | SecureValue | Optional. Credentials for encrypted personal details |
| passport | SecureValue | Optional. Credentials for encrypted passport |
| internal_passport | SecureValue | Optional. Credentials for encrypted internal passport |
| driver_license | SecureValue | Optional. Credentials for encrypted driver license |
| identity_card | SecureValue | Optional. Credentials for encrypted ID card |
| address | SecureValue | Optional. Credentials for encrypted residential address |
| utility_bill | SecureValue | Optional. Credentials for encrypted utility bill |
| bank_statement | SecureValue | Optional. Credentials for encrypted bank statement |
| rental_agreement | SecureValue | Optional. Credentials for encrypted rental agreement |
| passport_registration | SecureValue | Optional. Credentials for encrypted registration from internal passport |
| temporary_registration | SecureValue | Optional. Credentials for encrypted temporary registration |
SecureValue
This object represents the credentials required to decrypt encrypted values. All fields are optional and depend on the type of fields that were requested.
| Field | Type | Description |
| data | DataCredentials | Optional. Credentials for encrypted Telegram Passport data. Available for «personal_details», «passport», «driver_license», «identity_card», «internal_passport» and «address» types. |
| front_side | FileCredentials | Optional. Credentials for an encrypted document’s front side. Available for «passport», «driver_license», «identity_card» and «internal_passport». |
| reverse_side | FileCredentials | Optional. Credentials for an encrypted document’s reverse side. Available for «driver_license» and «identity_card». |
| selfie | FileCredentials | Optional. Credentials for an encrypted selfie of the user with a document. Available for «passport», «driver_license», «identity_card» and «internal_passport». |
| translation | Array of FileCredentials | Optional. Credentials for an encrypted translation of the document. Available for «passport», «driver_license», «identity_card», «internal_passport», «utility_bill», «bank_statement», «rental_agreement», «passport_registration» and «temporary_registration». |
| files | Array of FileCredentials | Optional. Credentials for encrypted files. Available for «utility_bill», «bank_statement», «rental_agreement», «passport_registration» and «temporary_registration» types. |
DataCredentials
These credentials can be used to decrypt encrypted data from the data field in EncryptedPassportElement.
To decrypt data, use the corresponding secret and data_hash from DataCredentials as described below:
Use AES256-CBC with this data_key and data_iv to decrypt the data (the data field in EncryptedPassportElement). IMPORTANT: At this step, make sure that data_hash from the credentials is equal to SHA256( data ) .
The data is padded with 32 to 255 random padding bytes to make its length divisible by 16 bytes. The first byte contains the length of the padding (including this byte). Remove padding to get the data.
The data is a JSON-serialized object of one of the following types: PersonalDetails, IdDocumentData, ResidentialAddress, depending on type.
FileCredentials
These credentials can be used to decrypt encrypted files from the front_side, reverse_side, selfie, files and translation fields in EncryptedPassportElement.
To decrypt the file, use the corresponding secret and file_hash from FileCredentials as described below:
Download the encrypted file using the getFile method.
Use AES256-CBC with this file_key and file_iv to decrypt the content of the file. IMPORTANT: At this step, make sure that file_hash from the credentials is equal to SHA256( file_content ) .
The content of the file is padded with 32 to 255 random padding bytes to make its length divisible by 16 bytes. The first byte contains the length of the padding (including that byte). Remove padding to get the file content.
Fixing errors
If the data you received contains errors, the bot can use the setPassportDataErrors method to inform the user and request information again. The user will not be able to resend the data, until all errors are fixed.
Обзор сервиса Telegram Passport
Один из самых популярных мессенджеров Telegram представил новую функцию для авторизации пользователей – Telegram Passport. Она позволяет упростить идентификацию в сервисах, где необходимо подтверждение личности. С помощью данной функции можно один раз загрузить свои документы в специальное облачное хранилище, после чего использовать их для входа на другие электронные площадки. Раньше нужно было это делать отдельно для каждого приложения. Подробно рассмотрим, как пользоваться таким сервисом.
Подробно о сервисе
Телеграмм Паспорт – единый метод идентификации для сервисов, которые требуют подтверждение личности пользователя. Достаточно одноразово загрузить необходимые документы. После этого можно мгновенно делиться своими данными с сервисами, где необходим реальный идентификатор (интернет-банкинги, электронные валюты).

Обмен данными с приложениями
Документы пользователя и его личная информация в Телеграмме будет храниться в специальном облаке. Оно защищено сквозным шифрованием. Для получения доступа к паспортным данным необходим ввод пароля, который известен только пользователю. Телеграм не имеет к ним доступа, что повышает уровень безопасности загруженной информации. Когда пользователь делится указанными данными, они отправляются непосредственно получателю.
Где можно использовать Passport
На данный момент попробовать, как работает Паспорт от Телеграма можно в ePayments. Это международный электронный платежный сервис. Но учитывая популярность самого мессенджера и простоту опции, в ближайшее время она появится и на других платформах. Все разработчики могут бесплатно интегрировать сервис в свои приложения. Это требует минимальных усилий и не требует написания кода.
Как пользоваться
Чтобы загрузить свои документы для авторизации в приложениях и электронных сервисах, выполните следующее:
- Откройте сервис, который запрашивает идентификацию через Паспорт. На сайте должна присутствовать ссылка Log In With Telegram. Можете использовать тестовую страницу https://core.telegram.org/passport/example, которую предлагает Телеграм.
- При отсутствии облачного пароля установите его. В противном случае введите запрашиваемую комбинацию.



Как редактировать информацию
При желании загруженную в Passport информацию можно редактировать или вовсе удалить. Чтобы это сделать, выполните следующее (для телефонов Андроид):
-
В своем телефоне перейдите в «Настройки», где выберите пункт «Конфиденциальность и безопасность». В разделе «Боты и сайты» кликните Telegram Passport.

Читайте также:
Как скачать музыку с Телеграма
Полезные советы
Совет №1
Для использования Паспорта необходимо наличие на телефоне пользователя последней версии Телеграма. Ее можно скачать с помощью следующих ссылок:
| Андроид | https://play.google.com/store/apps/messenger&hl=ru&gl=US |
| Айфон | https://apps.apple.com/ru/app/telegram/id686449807 |
Совет №2
Если хотите ближе познакомиться с сервисом, прочите, что пишет о нем в официальных источниках разработчика ПО – https://telegram.org/blog/passport .
Частые вопросы
Сколько проверяются документы в Телеграме?
Телеграм Паспорт не берет на себя роль модератора. Он не проверяет достоверность загруженных пользователем данных, и их соответствие определенным стандартам. Сервис только хранит информацию в зашифрованном виде. При авторизации каждое приложение или сайт обрабатывает данные самостоятельно, учитывая свои правила. Если все поля в Паспорте заполнены верно, ждать нужно не больше нескольких минут.
Сохраняется ли анонимность в Telegram после заполнения Паспорта?
Да, сохраняется. Авторизация на сторонних сервисах происходит без привязки к аккаунту в Телеграме. Также само приложение не имеет доступа к облаку, поэтому не сможет идентифицировать пользователя.
Не получается заполнить Passport. Что делать?
Такая проблема возникает, если сервис не одобрил введенную пользователь информацию. Это случается, когда были загружены фотографии запрашиваемых документов в недостаточно высоком качестве. Чтобы устранить проблему, перезагрузите изображения. Необходимо, чтобы текст был читаемым на всех снимках.
Telegram Passport
Telegram Passport поможет вам зарегистрироваться на сайтах и сервисах, требующих идентификации личности. Благодаря сквозному шифрованию end-to-end ваши персональные данные и документы, при этом будут надежны защищёны и никто не сможет получить к ним доступ, включая сам Telegram.
![]()
Процедура личной идентификации это всегда неприятный процесс. Сбор справок, сканирование документов, заполнение бланков, фотографирование с документами в руках, все это требует сил и времени. И как на зло каждый банк, биржа, ICO, да любой финансовый инструмент требует предоставить им кучу документов. Вот нам и приходится хранить фотографии паспортов, выписок из банка в своем фотоальбоме, в незашифрованном облаке, в папке на компьютере или на флешке, а это небезопасно и неудобно. Вот бы упростить этот процесс, чтобы один раз пройти идентификацию сразу для всех сервисов. Именно об этом подумал Павел Дуров и создал Telegram Passport. Конечно это не новая идея, многие пытаются реализовать подобное, но когда это останавливало Павла?
↑ Что такое Telegram Passport?
Команда, стоящая за приложением, говорит, что это второй этап проекта Telegram Login, который впервые был представлен еще в феврале. На данном этапе реализованы следующие функции:
- Хранение документов в облачном хранилище с помощью сквозного шифрования, что обеспечивает их полную конфиденциальность;
- Авторизация через мессенджер, избавляет вас от необходимости заполнять множество полей;
- Возможность выбрать документы, чтобы мгновенно и безопасно послать их на проверку;
- Хранить документы пользователей в децентрализованном облаке для лучшей защиты;
- Реализовать стороннюю проверку. Это означает, что вместо отправки фотографий вашего паспорта каждому сайту, Telegram сам проверит вашу учетную запись и если она окажется реальной, позволит авторизоваться.
↑ Как пользоваться
На данный момент использовать Паспорт от Телеграмма можно только в ePayments (электронный платежный сервис), но учитывая легкость интеграции и авторитет Павла Дурова, в недалеком будущем количество сервисов, где можно авторизоваться подобным образом, будет стремительно увеличиваться.
↑ Как добавить документы
Для начала нужен сервис, который запросит идентификацию, к примеру тестовый от Телеграм по этой ссылке: https://core.telegram.org/passport/example или любой другой. В любом случае на сайте этого сервиса должна быть кнопка «Log In With Telegram» или подобная, нажмите на нее и действуйте по инструкции:
-
Если у вас не установлен облачный пароль, начать нужно с его создания. Если пароль уже установлен, просто введите его.
![]()
- Удостоверение личности
- Адрес проживания
- Номер телефона
![]()
- Паспорт
- Водительские права
- Удостоверение личности
- Коммунального счета
- Справки из банка
- Договора аренда
![]()
↑ Как редактировать информацию
Если вы хотите изменить информацию или удалить документы на Android перейдите в Настройки > Конфиденциальность и безопасность > Боты и веб-сайты > Telegram Passport