-
I want to save a tdata session to a telethon. There is an example in the code: Can I define which system I should select? I see the system when running tdesk.ToTelethon(session="telethon.session", flag=UseCurrentSession) |---------+-----------------------------+----------+----------------+--------+--------------------------------------------+--------------| |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The You can always print the API out to see what's its parameters, for example: oldAPI = API.TelegramDesktop.Generate(system="windows", unique_id="old_tdata")
print(oldAPI) Also, if you're loading the tdata which was generated by Telegram Desktop app, you should just use the default API, without generating random device data. tdesk = TDesktop("tdata", api=API.TelegramDesktop)
# or just
tdesk = TDesktop("tdata") FYI: The tdata folder doesn't contain the information about which API was used to authorize its session, nor do the .session files of telethon. So it's impossible to know which API was used until we're logged in. But to my knowledge, this doesn't really matter, you won't get banned by Telegram for using the wrong API of that session. The only case I know which can get you banned is when that session is first authorized by an official API, by later on logged in using an unofficial API. |
Beta Was this translation helpful? Give feedback.
The
system
argument is either"windows"
,"macos"
or"linux"
based on which OS the Telegram Desktop is running on (which OS the tdata was authorized).I don't quite get what you mean by "Can I define which system I should select?", well, if you're running on Windows, then it's
"windows"
, if you're on macOS then it's"macos"
.You can always print the API out to see what's its parameters, for example:
Also, if you're loading the tdata which was generated by Telegram Desktop app, you should just use the default API, without generating random device data.