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

Sessions closed automatically #4

Open
AdemErsln opened this issue Nov 27, 2024 · 12 comments
Open

Sessions closed automatically #4

AdemErsln opened this issue Nov 27, 2024 · 12 comments

Comments

@AdemErsln
Copy link

AdemErsln commented Nov 27, 2024

image

The 1st account works very well, but when I add the 2nd account, it gives an error and logs out of Telegram (from all devices). Note: Only the 2nd account.

@AdemErsln AdemErsln changed the title test Sessions closed automatically Nov 27, 2024
@Desamod
Copy link
Owner

Desamod commented Nov 29, 2024

Try creating a session for a second account using a bot

@AdemErsln
Copy link
Author

Try creating a session for a second account using a bot

How?

@Desamod
Copy link
Owner

Desamod commented Dec 1, 2024

Using bot command

@scoterbey
Copy link

Sessions problem still going on

@AdemErsln
Copy link
Author

AdemErsln commented Dec 3, 2024

Sessions problem still going on

create sessions yourself example:

from telethon import TelegramClient

# Replace these with your own API ID and API Hash
api_id=
api_hash=""


# The session name can be anything; it will create a 'my_session.session' file
client = TelegramClient('my_session', api_id, api_hash)


async def main():
    # This will log you in if you aren't already
    await client.start()
    print(“Session successfully started!”)

    # You can add other functionalities here, like sending a message:
    # await client.send_message('username', 'Hello, this is a test message.')

# Run the client until the login is complete
client.loop.run_until_complete(main())

@scoterbey
Copy link

When I use this bot using a proxy, my Telegram accounts open on my phone and computer are closed. Then the bot gives an error. Please solve this problem.

@AdemErsln
Copy link
Author

When I use this bot using a proxy, my Telegram accounts open on my phone and computer are closed. Then the bot gives an error. Please solve this problem.

remove all sessions, create a session with the code I provided and throw the files into the bot and run it

@scoterbey
Copy link

sorry but ı dont know whre ı write this code

@scoterbey
Copy link

sende bu botun calısan ahali varmı kardesim

@AdemErsln
Copy link
Author

sende bu botu sağlam hali varmı kardesim

telegram iletişim bağlatnısı ver

@scoterbey
Copy link

@Firstscoterbey

@scoterbey
Copy link

adem kardesim botu gönderebilirmisin

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

3 participants