Search code examples
pythonpython-3.xtelegramtelegram-bot

Authentication in API Telegram


I new to this and I want to use auth.sentCodee in Python URL site : https://core.telegram.org/constructor/auth.sentCode

I even try with postman but I still got not found enter image description here

My gold is that I want to get OTP from api instead of going to application or web to send request.


Solution

  • You're looking at the wrong documentation. Telegram provides multiple API's.

    The auth.sentCode method you're linking is from the Telegram Core, but you're trying to call it via the Telegram Bot Api Documentation.


    My goal is that I want to get OTP from api instead of going to application or web to send request.

    You'll need to create your own Telegram Application, to be able to read your own chats (so no bots involved). Using a custom application like that allows you to read the Telegram chat in which the OTP code is send.


    Since you've tagged your question with , I'd suggest taking a look at Telethon. A library to interact with Telegram's API as a user or through a bot account (bot API alternative).