Is it possible to create a telethon client starting from auth_key only?
07:24 16 Nov 2019

The hello world of telethon looks like:

from telethon import TelegramClient

client = TelegramClient(name, api_id, api_hash)

async def main():
    # Now you can use all client methods listed below, like for example...
    await client.send_message('me', 'Hello to myself!')

with client:
    client.loop.run_until_complete(main())

Like this it will ask me to sign in the first time, by providing phone and confirmation code. Next time it will reuse information stored locally.

What i want is to give it a auth_key and use that. So basically i want it to look like this: from telethon import TelegramClient

auth_key = "ca03d.....f8ed" # a long hex string

client = TelegramClient(name, api_id, api_hash, auth_key=auth_key)

async def main():
    # Now you can use all client methods listed below, like for example...
    await client.send_message('me', 'Hello to myself!')

with client:
    client.loop.run_until_complete(main())
python-3.x telegram telethon