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

Help use with pyrogram string session #11

Closed
stlazs opened this issue May 17, 2024 · 2 comments
Closed

Help use with pyrogram string session #11

stlazs opened this issue May 17, 2024 · 2 comments

Comments

@stlazs
Copy link

stlazs commented May 17, 2024

Hello SVTcore
I have format like in img, with api_id, api_hash, pyrogram string session, how to I can use that with this project, many thanks!

image

@svtcore
Copy link
Owner

svtcore commented May 17, 2024

Hi, thanks for opening issue, in you case you could authorize through session string instead of session file like

session_string = "YOUR SESSION STRING HERE"
api_id = 12345
api_hash = "827ccb0eea8a706c4c34a16891f84e7b"
app = Client("my_session", session_string=session_string, api_id=api_id, api_hash=api_hash)
with app:
    result = app.get_me()
    print(result)

In the next update, I will consider your suggestion about using a string session. Thanks!

@svtcore
Copy link
Owner

svtcore commented May 17, 2024

It's done. Pull the project with the latest commit, then set up the .env file according to these instructions. After that, place only the string sessions (from the session_string_pyrogram column) into the accounts.txt file, then run the script. I recommend testing it with a small amount first.

py bot.py --run --strings --tokens accounts.txt

@svtcore svtcore closed this as completed May 19, 2024
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