Телеграм ошибка update app to login

Содержание

  1. Написать Telegram клиент — легко
  2. Суть приложения
  3. Как мы это делали
  4. Что получилось
  5. Creating your Telegram Application
  6. Телеграмм пишет internal server error
  7. Internal server error в Телеграмм на ПК при вводе номера телефона: что это такое?
  8. Подождать
  9. Сообщить администратору ресурса
  10. Что при ошибке 500 пользователю делать бессмысленно
  11. Что за ошибка «UPDATE_APP_TO_LOGIN» в Telegram: как ее исправить
  12. Решение
  13. Работа WTelegramClient
  14. error The request was canceled: A secure channel for SSL / TLS could not be created on create new TelegramBotClient #867
  15. Comments

Чем отличается Telegram от других популярных мессенджеров? Он — открытый!
Другие мессенджеры тоже имеют API, но почему-то именно телеграм известен как наиболее открытый из самых популярных?

Начнем с того, что у Telegram действительно полностью открытый клиентский
код. К сожалению, мы не видим комиты каждый день прямо на GitHub, но у нас есть код под открытой лицензией. Архитектура Telegram подразумевает, что и Bot и API имеет практически такие же методы — https://core.telegram.org/methods.

На самом деле, Telegram представляет не просто чат-мессенджер, а социальную платформу, доступ к которой открыт для разного рода приложений. Они могут предоставлять дополнительные фишки пользователям, взамен используя готовую сеть пользователей и сервера для доставки сообщений. Звучит настолько привлекательно, что нам захотелось попробовать написать своего «клиента» для Телеграм.

Суть приложения

В основном мы занимаемся картами и навигацией, поэтому мы сразу смотрели что-нибудь связанные с геолокацией. Мне очень понравилось, что в Telegram, раньше всех остальных приложений, появился удобный способ делится местоположением в реальном времени (https://telegram.org/blog/live-locations) и я достаточно часто этим пользуюсь: помочь сориентироваться другу, показать дорогу и самое главное ответить на главный вопрос «Когда ты будешь?». В принципе, этого хватает большинству людей, но как всегда есть сценарии, когда простых возможностей не хватает. Например, это может быть группа более 10 человек, с разными устройствами (некоторые устройства возможно не являются телефонами) и разными людьми. Этим людям было бы удобно обмениваться сообщениями в группе, а также видеть перемещения друг друга на карте.

Во главу угла мы поставили задачу создать дополнительную ценность для Telegram, а не пытаться использовать его не по назначению. Мы не хотели, чтобы люди у которых нет специального клиента Телеграм, видели в чате месиво сообщений или что-то невразумительное. У людей с «улучшенным» клиентом, появляются же дополнительные возможности, например:

  1. Более тонкое управление временем при отправке локации в реальном времени в чат.
  2. Просмотр местоположения контактов на карте.
  3. Подключение к чату маячковых устройств, через внешний API (Bot).

Как мы это делали

К счастью, весь код, который мы пишем — Open-Source, поэтому я сразу могу дать ссылку на его реализацию — Реализация Bot и Реализация Telegram Client на Kotlin.

Bot — основы

По реализации Bot существует достаточно много документации и примеров, но все же хочется пройтись и рассказать про некоторые подводные камни. Для начала, мы писали серверную часть
на Java и выбрали библиотеку org.telegram:telegrambots. Так как наш сервер — это обычный SpringBoot, то инициализация крайне простая:

Основная особенность передачи location, что его надо часто обновлять, и боту необходимо редактировать уже отправленные сообщения. Если бы не было такой возможности, то Bot бы просто заспамил чат и это, конечно, был бы Epic Fail. Слава богу, Telegram предоставляет права боту редактировать сообщения на протяжении 24 часов (минимум, возможно и дольше).

Передать сообщение можно многими способами. Есть тип Plain Text, Venue, Location, Game, Contact, Invoice и т.д. Казалось, что для нашей задачи отлично подходит Location, но вскрылась неприятная особенность. Location можно передать только с одного устройства для одного аккаунта или бота одновременно! Представьте у вас 2 телефона и с двух телефонов вы отправили свой Location в один чат. Так вот, на сервере случится ошибка и первый Location Sharing просто остановится. Казалось бы, это явно неральный случай, но представьте, у вас много китайских маячков, которые умеют отправлять Location по заданному URL, но они не умеют отправлять прямо в Telegram. Вы пишите Bot, который забирает с сервера и пушит в телеграм. Вот тут и вылазит, то что Bot не сможет отправить больше одного сообщения маячка с типом Location. Получается, это отлично подходит для единоразовой отправки, но не подходит для Live Location.

Решение простое — отправлять текстовые сообщения, а клиент будет парсить текст и показывать локации на карте. К сожалению в стандартном клиенте Telegram будут видны только текстовые сообщения, но там можно вставить ссылку, чтобы открыть карту.

Bot — Подводные камни

К сожалению, Bot пришлось переписывать аж 2.5 раза. Основная проблема — неправильный дизайн коммуникации.

  1. Почему-то вначале казалось хорошей идеей, если бот будет полноценным участником чата и отправлять сообщения. Но, это плохо и с точки зрения Privacy переписки и с точки зрения взаимодействия с ботом. Правильное решение, использовать Inline bots. Таким образом, гарантируется, что бот не видит ничего кроме своего Location и его можно использовать в любом чате. По-человечески говоря, некультурно тащить своего бота в какой-то общий чат, а нужно пообщаться с ботом один на один и настроить его, а дальше он сможет отправлять нужные сообщения в любой выбранный чат.
  2. В Telegram Message API есть исторически 2 типа взаимодействия: кнопки под текстом ( (inline buttons)[https://core.telegram.org/bots/2-0-intro#switch-to-inline-buttons] ) и ответы боту напрямую текстом. В общем, ответы с ботом безнадежно устарели. Кнопки немного сложнее с точки зрения реализации, но это полностью окупается удобством использования и именно их надо использовать для всего нетекстового ввода.
  3. В качестве примера бота можно посмотреть популярный @vote_bot или наш @osmand_bot.
Telegram Client

Найти примеры готовых telegram client, кроме основного, нам не удалось, но достаточно простая структура tdlib помогла нам создать базовый клиент буквально за пару дней.

Практически все внутренности Телеграмма написаны на С++ и с точки зрения Android виден только класс API на 1.5 Мб прокси методов TdApi.java. Путем сопоставления документации ботов и названия методов, можно достаточно просто сориентироваться куда двигаться.

Telegram Client — подводные камни

Что получилось

Наверное, зная все подводные камни можно было бы все сделать в разы быстрее, но получилось где-то 1-2 месяца на трех человек. Финальное приложение можно найти в Google Play.

Главный вопрос в этой истории, насколько правильно это взаимодействие с точки зрения Телеграма и понравятся ли пользователям такого рода интеграции. В любом случае, сама идея нишевая и отдельных клиентов она уже нашла.

Источник

Creating your Telegram Application

We welcome all developers to use our API and source code to create Telegram-like messaging applications on our platform free of charge.

In order to ensure consistency and security across the Telegram ecosystem, all third-party client apps must comply with the API Terms of Service.

In order to obtain an API id and develop your own application using the Telegram API you need to do the following:

  • Sign up for Telegram using any application.
  • Log in to your Telegram core: https://my.telegram.org.
  • Go to «API development tools» and fill out the form.
  • You will get basic addresses as well as the api_id and api_hash parameters required for user authorization.
  • For the moment each number can only have one api_id connected to it.

We will be sending important developer notifications to the phone number that you use in this process, so please use an up-to-date number connected to your active Telegram account.

Before using the MTProto Telegram API, please note that all API client libraries are strictly monitored to prevent abuse.

If you use the Telegram API for flooding, spamming, faking subscriber and view counters of channels, you will be banned forever.

Due to excessive abuse of the Telegram API, all accounts that sign up or log in using unofficial Telegram API clients are automatically put under observation to avoid violations of the Terms of Service.

If you didn’t violate the Terms of Service but your account does get banned after using the API, write to recover@telegram.org explaining what you intend to do with the API, asking to unban your account.
Please note that emails are checked by a human, so automatically generated emails will be detected and banned.

Everyone is welcome to use our open source code. We have included a sample API id with the code. This API id is limited on the server side and is not suitable for apps released to end-users — using it for anything but testing purposes will result in the API_ID_PUBLISHED_FLOOD error for your users. It is necessary that you obtain your own API id before you publish your app.

Please remember to publish your code as well in order to comply with the GNU GPL licences.

Источник

Телеграмм пишет internal server error

14.11.2022 775 Просмотры

Ошибка 500 (Internal Server Error) — это внутренняя проблема сервера. Она возникает, когда браузер или другой клиент отправляет серверу запрос, а тот не может его обработать.

Одна из самых частых причин появления ошибки 500 — это неправильный синтаксис файла .htaccess. Кроме того, она порой возникает после загрузки на сервер неверных CGI‑скриптов или установки некорректных прав доступа.

То есть в ошибке 500, как и в других ответах с кодом, который начинается на цифру 5, виноваты разработчики или администраторы сервера. Но никак не пользователи.

Internal server error в Телеграмм на ПК при вводе номера телефона: что это такое?

У каждого электронного месенджера имеется ряд небольших проблем, с которым сталкиваются пользователи по всему миру.

Внутренняя ошибка сервиса случается чаще всего при вводе номера телефона, когда человек пытается войти в систему на свою страницу. Любой задумывался как же это препятствие всё-таки убрать.

Если закрыть Телеграм после такого и открыть заново, введя номер, то можно получить сообщение:

internal server error

— это telegram desktop (в web online версии вообще не будет никакого сообщения, что совсем обескураживает)

Что делать пользователю при ошибке 500

Если вы увидели ошибку 500 на чужом сайте, есть два варианта.

Подождать

Если у вас нет доступа к этому ресурсу, вы не сможете отредактировать файл, изменить настройки или выполнить другие подобные действия. Поэтому стоит подождать, пока администратор исправит ошибку, и зайти на сайт позднее.

Сообщить администратору ресурса

Не все владельцы сайтов круглосуточно мониторят логи и читают сообщения об ошибках. Вполне возможно, что администратор просто не в курсе, что сайт перестал работать.

В таком случае вы можете помочь. Попробуйте найти контактную информацию и связаться с владельцем ресурса, чтобы сообщить о проблеме. Если на самом сайте из‑за ошибки 500 вы никаких полезных данных не видите, найдите сохранённую копию страницы в поисковиках или в архиве интернета.

Что при ошибке 500 пользователю делать бессмысленно

Так как проблема связана с сервером, то нет резона что‑то предпринимать со стороны клиента. Поэтому не пытайтесь:

  • перезагружать компьютер;
  • менять браузер;
  • переустанавливать ПО;
  • перезагружать роутер.

И тут даже сбросить аккаунт сразу не получится — придётся ждать пока сервер соизволит прислать код.

Источник

Что за ошибка «UPDATE_APP_TO_LOGIN» в Telegram: как ее исправить

Код ошибки 406 «UPDATE_APP_TO_LOGIN» означает, что версия библиотек устарела.

Причины:

  1. Телеграмм начал принудительно использовать 64-битовый расширенный уникальный идентификатор.
  2. Текущая стабильная версия клиента на данный момент их не поддерживает, потому что использует устаревший уровень программного интерфейса.

Как указано на странице проекта TLSharp больше не поддерживается, и не будет обновляться.

Решение

Вы можете переключиться на WTelegramClient, который:

  1. Предлагает обновленный программный интерфейс (последний уровень).
  2. Безопаснее (последняя реализация MTProto v2 и множество проверок безопасности).
  3. Полнофункциональный (программный интерфейс охватывает все методы обработки обновлений, подключения с несколькими постоянными токами).
  4. Простой в использовании (прямые методы с полностью документированными параметрами).
  5. Разработан для .NET 5.0+, но также доступен для .NET Version 2.0 (.NET Framework 4.6.1+ и .NET Core 2.0+).
  6. Позволяет обновиться до последней версии (1.7.9) в стабильной версии клиента после подключения и входа пользователя.

Работа WTelegramClient

При запуске пользователю будет предложено в интерактивном режиме ввести данные приложения (которые он получает на странице Telegram) и попытаться подключиться к серверам Telegram.

Затем программа попытается войти в систему как пользователь, для которого необходимо ввести номер телефона и код проверки. Он будет отправлен этому юзеру, через SMS.

Если проверка прошла успешно, но номер телефона неизвестен Telegram, человеку может быть предложено зарегистрироваться и указать свои имя и фамилию. Если учетная запись уже существует и включила двухэтапную проверку (2FA), может потребоваться пароль. Все эти сценарии входа в систему обрабатываются автоматически.

При повторном запуске программы произойдет автоматический вход в систему и можно начинать использование. Это связано с тем, что WTelegramClient сохраняет свое состояние (в зашифрованном файле bin) и ключи аутентификации, которые были согласованы с Telegram, чтобы не было необходимости каждый раз входить в систему снова.

Данный файл при различных обстоятельствах (изменение адреса пользователя или сервера) можно изменить или удалить, чтобы перезапустить процесс аутентификации.

Источник

error The request was canceled: A secure channel for SSL / TLS could not be created on create new TelegramBotClient #867

Please DO NOT post it! We don’t provide support in GitHub issues any more.

We would be happy if you join our group chat on Telegram and ask the community to help.

If you open an issue asking for support, the issue would be closed without providing any answer.

The text was updated successfully, but these errors were encountered:

I have the same error. I am adding my report based on the but report guidelines.

Steps to reproduce:
Download Telegram.Bot repo
Include in project
Add calls to project
Run application
Expected behavior
Receive messages from Telegram users.
Actual behavior
Receiving Error: «An error occurred while sending the request.» & vbCrLf & «The request was aborted: Could not create SSL/TLS secure channel.»
Screenshots

Environment data
Latest Telegram.Bot (Version 15.3.0, Last update 2020-02-01)
Compiler, Visual Studio 2017
.Net Version 4.5
App: Windows 10 (Desktop, Modified console app)

@Ayanami251379 i have some problem but im on production, Maybe anyone can help?

The same problem reproduces for old library version (14.10.0). Our bot isn’t working.

same issue. any updates?

Well same here. but my application works just fine around 18 hours ago with old library version (13.x.x).
Updated to the latest version but still not working.

@bukanfarid Me 2, My bot works fine about 12Hrs ago I’ve used V14.x.x
also, I update to the new version but it won’t work

I have some issue, that appeared this morning
Version of Telegram.Bot: 14.10.0.0
.Net Version: 4.6.1
System: Windows 10
App type: Console

before :
var me = await Bot.GetMeAsync();

this is working for me

Thanks for your reply @Chrislie7 , i tried it and it working like a charm! 👍

before :
var me = await Bot.GetMeAsync();

this is working for me

I can confirm this is working for me as well, thank you @Chrislie7
I added the security change outside the TelegramBot library as the correct dependency is not part of the TelegramBot library.

So, the problem is due to Telegram disabling everything older than TLS v1.2 (which is not used as the default in .NET Framework 4.5). The best way to mitigate this problem is to update to .NET Framework 4.6-4.8 or even to .NET Core 3.1 (this is preferrable if you can do that).

If you can’t upgrade your system or .NET Framework to a newer one there might be a solution. One of the members in our group came up with a guide how it can be mitigated:

So, this is the final instruction for those who faces the problem «The request was aborted: Could not create SSL / TLS secure channel»

Windows 7 / Server 2008 R2:

Update your system.

If you use .NET Framework 4.5, add this line somewhere before you initialize TelegramBotClient:

or target .NET Framework 4.6 and higher to use TLS 1.2 as default.

  1. If the error is still here, try to follow these instructions to enable TLS 1.1 and TLS 1.2 as default secure protocols in WinHTTP in Windows (https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-wi) (but this didn’t work for me until I updated my system).

Windows 8.1/Server 2012 R2 and higher:

My thanks to both @Chrislie7 and @tuscen . The solution provided works for .NET Framework 4.5.1

This is not working for me, even forcing Tls12 as you can see here
Version of Telegram.Bot: 15.3.0
Windows Server 2012 R2 Version 6.3 (Build 9600)
Framework installed: 4.8
Targeted Framework: 4.8
App Type: GUI

Forced Tls12 and tried to enable all of them
Just for testing in the I added the following to ensure as well.

ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls13;

Created my own httpClient to pass to the bot, nothing works. Continuously getting this error since
2/5/2020 at approx 11:00PM MST works perfectly fine on Windows 10 and Windows 10 server

Even tried creating my own httpClient to pass to it including handler with Customer validation callback set to always true just to see if that would do anything (pretty sure it wouldn’t have but ruling it out)

The bot is also targeting dotnet 4.8

Just a quick update, I was able to resolve my issue on my Windows Server in case anyone else that may be having the same issue as me.

It appears that TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 must be enabled and you can enable this using IISCrypto
Just to be clear this was not a requirement to have before, not sure why it is now.

Additionally to what @amoamare said, these are the only ciphers that are currently (2020/02/07) usable for TLS1.2 for the API (Viewable on the SSL Labs site):

For those on Windows Server 2012 R2, forget trying to find the first three since they are only available from Windows Server 2016 onwards.
Enabling one of the last two will allow your connections to work.

Additionally, the error message that I got was different than the one reported here, but all had to do with TLS configurations. Adding it here for the searches and knowledge.

System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
—> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
—> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted
this was due to the missing ciphers and the server then not responding with a «Server Hello» but with a «Fatal Alert: handshake_failure» response.

Hi, i have solved this problem, setting my dns to google 8.8.8.8 and 8.8.4.4
And everything started to work
Before it you shoud use .net >= 4.6.1 or write this in your c# program,

Sorry for my english )

Set dns names to 8.8.8.8 — all works.

This is not working for me, even forcing Tls12 as you can see here Version of Telegram.Bot: 15.3.0 Windows Server 2012 R2 Version 6.3 (Build 9600) Framework installed: 4.8 Targeted Framework: 4.8 App Type: GUI

Forced Tls12 and tried to enable all of them Just for testing in the I added the following to ensure as well.

ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls13;

Created my own httpClient to pass to the bot, nothing works. Continuously getting this error since 2/5/2020 at approx 11:00PM MST works perfectly fine on Windows 10 and Windows 10 server

Even tried creating my own httpClient to pass to it including handler with Customer validation callback set to always true just to see if that would do anything (pretty sure it wouldn’t have but ruling it out)

The bot is also targeting dotnet 4.8

I have finally solved this awful problem by updating windows. Believe me, adding some code or forcing tls 1.2 do not work. The only reason for this is your operating system lack some basic libraries or something like to support the communication with telegram interface.
Therefore, you should download updating packages for your windows. Take my computer with win 7 as an example, download the latest updating package collection UpdatePack7R2.exe and run it. It is big and the installation time is very costly. It may be hours. There are also many reboots. The only thing you can do is waiting. After all is done, running your program and you will find everything is fine.
Let’s praise Microsoft and Telegram!

Источник

Telegram Error Update App to Login

Telegram is a messaging app known for its encrypted chat feature, making it a preferred choice for many people who want to keep their messages private. However, things can go south, and you may see a Telegram error “update app to login,” leaving you frustrated.

If you are experiencing the Telegram error saying update the app to login, it happens due to technical issues with the app, or the app is not updated correctly. To troubleshoot the error, restart your device or update the telegram app from the App Store or Google Play Store.

In this article, we will discuss how to fix the Telegram login error with some quick DIY fixes so that you sign in to the app and resume your communications without any issues.

Why is Telegram not signing in?

update telegram app

One of the following might be the reason why you are seeing the Telegram error update app to login message on your device’s screen.

  • The version of the Telegram app you are using is outdated.
  • There are some technical issues with the app.
  • The app is not updated correctly.
  • The telegram app’s installation files are corrupted.
  • App cache data has become bulky or corrupted.
  • Your device is experiencing glitches due to which a conflict is created with the app.
  • The Telegram server is facing an outage.

How do I fix the Telegram error update app to login?

clear cache data

Try out the following 4 methods to quickly fix the Telegram error update app to login message on your device.

Update the Telegram app

The first thing you should do is to update the Telegram app correctly. An outdated app can be the cause of the errors in the Telegram phone and desktop app.

To update the app, do the following:

  • Grab your device and ensure that you are connected to a stable internet connection. 
  • Head over to the App Store or Google Play Store, type Telegram, and select the app from the search list in the search bar. 
  • Now, tap on Update and wait for the process to complete. 
  • After the update, launch the Telegram app and try signing in to verify the fix. 

Note: You can also update the app under the profile option in the Google Play Store or App Store. To do so, go to Profile > My apps and games > Updates tab. Afterward, find the Telegram app and tap on the Update option. 

Restart your phone 

Next, try restarting your phone. This will close all apps and services running in the background and clear out bugs and glitches in the app. As a result, it will help you fix the update error on Telegram.

To restart your phone, follow the steps below:

  • Press and hold down the Power button for a few seconds until you see the power menu. 
  • From the power menu, select Restart or swipe the slider to restart.
  • Now, wait for your device to reboot. 
  • Afterward, try signing in to Telegram to check if the error is resolved.

Clear cache data 

If restarting your phone doesn’t work, clear the app’s cache data to reset the app and delete all its corrupted and temporary files. To remove the Telegram cache data on your device, follow these steps:

For Android

  • Go to the Settings menu and tap on Apps/Applications Manager.
  • Locate and select the Telegram app from the list.
  • Now, tap on the Storage option and then select Clear Cache.
  • Reboot your phone and open the Telegram app to see if the error has been fixed.

For iPhone

  • Head over to the Settings app and tap on the General option.
  • Now, go to iPhone Storage, find the Telegram app, and tap on it.
  • You will see the Offload App option, tap on it.
  • This will uninstall the Telegram app, but the app data will be saved.
  • Next, go to the App Store and search for the Telegram app.
  • Tap on the Install option and launch the app once the app is installed.
  • Log in to the app and see if the issue persists.

Uninstall and reinstall the Telegram app 

Another reason why you are facing the error is that the installation files of the Telegram app are corrupted. Uninstall and reinstall the Telegram app to delete corrupted installation files of the app from your phone and install a fresh copy. To do so:

  • Grab your phone and hold the Telegram app. 
  • Now, tap on Uninstall and then select OK to confirm.
  • After the app has been uninstalled, go to the App Store or Google Play Store and search for the Telegram app to download it.
  • Next, tap on the Install option to install the app.
  • Finally, launch the Telegram app and try signing in to verify the fix.

How do I factory reset my phone?

factory reset phone

If none of the above methods work, try factory resetting your phone. This will erase all corrupted data, files, or glitches from your phone that create conflict with the app, resulting in different issues like being unable to send messages or login errors. To do so:

For Android

  • From your Android phone’s home screen, go to Settings
  • Now, scroll down to the Systems/General Management option and tap on the Reset option.
  • Under the Reset menu, tap on the Factory Data Reset option. 
  • Scroll down, tap on the Reset option and enter your phone PIN or password.
  • Afterward, confirm your action when prompted. 

For iPhone

  • Head over to the Settings menu on your iPhone, tap on the General option, and tap on Transfer or Reset. 
  • Next, tap on the Erase All Contents and Settings. 
  • Your iPhone will restart after the update and set to default settings. 
  • Configure your device after the reset is complete, and install the app. 

Finally, launch the Telegram app to see if the issue is resolved. 

Note: A factory reset will delete all the data from your phone, so make sure to back up all your important data before proceeding.

Conclusion 

This article provides four easy-to-follow steps to help you troubleshoot and fix the Telegram error update app to login. Hopefully, with these steps, you can login to the Telegram app and start connecting with your family and friends. 

However, if you are still getting the error, connect with Telegram customer support service to get further assistance. 

About the Author

Tauqeer

Tauqeer is a technology expert with over 10 years of experience in the industry. He has a degree in Computer Science and specializes in network security and software troubleshooting.

View All Articles

Hi i am using TLSharp latest version is 0.1.0.574 and when i call var hash = await client.SendCodeRequestAsync("<my_phone>"); i got error System.InvalidOperationException: 'UPDATE_APP_TO_LOGIN' anyone know how to fix it

My code

TelegramClient client = new TelegramClient(appid, "apihash",null,"session",null,DataCenterIPVersion.OnlyIPv4);
await client.ConnectAsync();
var hash = await client.SendCodeRequestAsync("<my_phone>");
string code = "";
await client.SignUpAsync("<my_phone>", hash, code, "<fist_name>", "last_name");

asked Dec 8, 2021 at 5:06

OS Coder's user avatar

2

The error «UPDATE_APP_TO_LOGIN» happens because your Telegram Client/Library uses an obsolete API layer.

As stated on its project page, TLSharp is no longer maintained and will not be updated to fix this.

You should switch to WTelegramClient which is:

  • offering up-to-date API (latest layer)
  • safer (latest MTProto v2 implementation and many security checks)
  • feature-complete (covers all API methods, handling of updates, multiple-DC connections)
  • easy-to-use (API calls are direct methods with fully documented parameters in VS)
  • designed for .NET 5.0+, but also available for .NET Standard 2.0 (.NET Framework 4.6.1+ & .NET Core 2.0+)

Available on Nuget. ReadMe/Github is here.

answered Jan 31, 2022 at 21:43

Wizou's user avatar

WizouWizou

1,29612 silver badges23 bronze badges

@mckaygerhard

its not funny when you are the FORCED one.. right? some one will give you one! maybe already done in your healt! have you a stable family

Shit happens, and it happens unexpectedly. And a person can barely be considered mature if they cannot handle this.

i will not change a complete OS only due a stupid app forces to..

How is that even related? What is you problem exactly?

I successfully use Telegram even on an embedded OS that was abandoned 10 years ago, via a Jabber transport.

Is there a Jabber client for your OS? If not, make an IRC one; the protocol is simple as heck, basically just plain text over a socket. Bitlbee + tdlib-purple = perfect, many of people use it this way already.

@Flohack74

prevent from fixing security leaks, performance problems or scalability

Not everyone cares about the security paranoia and the maximum performance. Just like not every house is as armed as banks are, and not everyone drives a racing car on public roads.

Just remember that many things that were considered a «progress» before eventually brought us health, social and environmental issues. And e-waste is a part of that.

Please do not comment more emotions and curses, stay with the facts.

It would be reasonable if @levlam had proven that the decision to break the compatibility was not emotional itself. I still have not seen yet, neither here nor in the TDlib chat, any strong explanation of why it had to be done exactly this way: before the deadline and by disconnecting users with 32-bit IDs as well. Moreover, they had assured me that old clients will keep working, right while first users were experiencing login issues already.

Right now it just looks like the team, tired by a compatibility burden, had made an unpopular decision but tries to hide that behind vague and polite excuses to soothe the public. It would be expected from a typical evil corp that just honestly makes money and does not give a shit for anything else unless demanded — but not from a company that has chosen the users’ trust as a marketing strategy. Trust means being honest about any decisions, both popular and unpopular. The introduction of ads is justified well; the API breakage is not: that’s the fact :)

If you get the error code 406 «UPDATE_APP_TO_LOGIN», means that the TDLib version is outdated and must be updated to latest 1.7.9 version, the reason is that Telegram has migrate to 64-Bit identifiers and previous versions are not compatible, so it’s not possible login with a phone (login with an existing account and QR code is still possible on 1.7.0 version).

sgcWebSockets users can download the latest 1.7.9 version from the private account for the following personalities:

  • Windows 32
  • Windows 64
  • OSX 64
  • Linux 64
  • Android (32/64)
  • iOS 64

Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn’t miss them.

Your Name

E-mail Address

About the author

Admin

since today, I’m getting this error when trying to login into my telegram account with telethon:

RPCError 406: UPDATE_APP_TO_LOGIN (caused by SendCodeRequest)

I don’t see this in the official documentation, any idea how to fix this?

asked Dec 1, 2021 at 8:11

Val's user avatar

2

Have a look in the Telethon Updates Channel

Edit: The Patch is already released, just update your telethon like shown below

Quote:

Telegram has started enforcing the use of 64-bit identifiers for users and chats, and the current stable version of the library does not support them yet. If you try to login, you may see UPDATE_APP_TO_LOGIN error.

answered Dec 1, 2021 at 8:16

Jakob's user avatar

JakobJakob

813 bronze badges

It’s worked in my case,

pip install --upgrade telethon

answered Dec 6, 2021 at 6:09

shoaib21's user avatar

shoaib21shoaib21

4791 gold badge6 silver badges10 bronze badges

Just update telethon lib to version 1.24

answered Dec 3, 2021 at 12:07

Кирилл Дербенев's user avatar

1

Понравилась статья? Поделить с друзьями:
  • Телеграм ошибка 740
  • Телеграм ошибка 400
  • Телеграм выдает ошибку на компе
  • Телеграм бот для проверки текста на ошибки
  • Телеграм internal server error ошибка