Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get a bug, always when i try to run code #4076

Closed
ekondrashov25 opened this issue Mar 30, 2023 · 1 comment
Closed

Get a bug, always when i try to run code #4076

ekondrashov25 opened this issue Mar 30, 2023 · 1 comment

Comments

@ekondrashov25
Copy link

Checklist

  • [ x] The error is in the library's code, and not in my own.
  • [ x] I have searched for this issue before posting it and there isn't a duplicate.
  • [ x] I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.

I ran this code a week ago and everything worked perfectly, but now that I’m running it, I keep getting this bug and the same current telegram session on all my devices goes missing and leaves my account

Code that causes the issue

from telethon.sync import TelegramClient
import config

client = TelegramClient('anon', api_id, api_hash)
client.start()
chat_id = config.chat_id
chat_id2 = config.chat_id2

@client.on(events.NewMessage(chat_id))
async def main(event):
    await client.forward_messages(chat_id2 , event.message)

client.run_until_disconnected()

Traceback

telethon.errors.rpcerrorlist.SessionRevokedError: The authorization has been invalidated, because of the user terminating all sessions (caused by GetDifferenceRequest)

@Lonami
Copy link
Member

Lonami commented Mar 31, 2023

This error comes from Telegram. It's not something Telethon can fix. See #4051.

@Lonami Lonami closed this as completed Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants