tdata vs session in Telegram: what they are, how to log in, and how to use them
tdata and session are the two formats used to store and hand off Telegram accounts. Both hold the same auth key inside, so a file with that key is the same as access to the account. The most dangerous thing is giving that file to someone else or opening one session in two places at once.
We take in accounts as tdata, .session files and session strings every day, and we know what they most often fail on: usually a duplicate connection or a changing IP.
What tdata is
tdata is a folder with Telegram Desktop app data. It holds settings, cache and, most importantly, the auth key that Telegram uses to recognize the device and let you into the account without an SMS code and without a cloud password.
Look for the tdata folder here:
- Windows: %APPDATA%\Telegram Desktop\tdata (you can paste the path into the Explorer address bar);
- macOS: ~/Library/Application Support/Telegram Desktop/tdata, and only for the Telegram Desktop app from the Telegram website; the App Store version has no tdata format;
- Linux: ~/.local/share/TelegramDesktop/tdata.
If a local passcode is enabled in Telegram Desktop, the data in tdata is encrypted, and you can't open the folder without that code.
What an auth key is
An auth key is the authorization key, the secret a device uses to prove to Telegram that it's the right one. Whoever owns the key owns the account, and they don't need the code or the cloud password. That's why both tdata and session are essentially keys to the account.
What session and session json are
A .session file is created by programs built on the Telethon and Pyrogram libraries. Inside is the same auth key and the Telegram data center number. Official apps don't open these files; only programs for working with accounts read them.
Next to .session there's often a .json with a description from the seller: the number, device and app parameters, sometimes the cloud password. Usually it's just reference info about the account, and the key itself is stored in .session, though you do come across json files with a session string inside. A session string is the same key written as one line of text.
So tdata, .session and a session string all store the same thing, the key, just packaged differently.
How to log in to an account via tdata
- Download Telegram Desktop from the official website; the portable version is more convenient since you don't have to install it.
- Put the tdata folder next to the Telegram.exe file, replacing the one already there.
- Launch Telegram.exe and the account opens without a code. If a local passcode is set, Telegram will ask for it.
Log in from the same IP, or at least from the same country as the number, and don't keep the account open in two places at once (we explain why below).
How to log in via tdata from a phone
You can't open tdata on a phone. Open it in Telegram Desktop, then log in on the phone by number: the code arrives as a message from Telegram right in the open Desktop.
How to use session and json
.session files and session strings are loaded into programs for working with accounts or into cloud services, and the program pulls out the key and connects to Telegram itself. An ordinary user has no reason to create a .session: the file appears when you log into an account through such a program, and bought accounts are often sold in this format right away.
Do you need a tdata to session converter
The formats store the same key, so you can convert them into each other, and converters exist, including open-source ones. Uploading tdata to someone else's online converter or bot is dangerous: it's the same as handing over the account.
If your program accepts both formats, you don't need a converter at all. TG Combine, for example, pulls the key out of tdata itself and accepts .session, session strings and auth key, so there's nothing to convert.
How to view and end active sessions
The list of devices where the account is open is in Telegram: "Settings → Devices" (in some versions, "Privacy → Active Sessions"). There you can see the device, IP and last activity time, and the "Terminate all other sessions" button kicks off every device except the current one.
On a device you logged into less than a day ago, you can't end other sessions; you have to wait 24 hours. For a bought account this matters a lot: the seller keeps a copy of the tdata or session, and until their session is ended and the cloud password is changed, they can take the account back.
Why you can't run one session in two places
If the same key works from two connections at once, for example in two programs or in a program and Telegram Desktop on different IPs, Telegram may revoke it with the AUTH_KEY_DUPLICATED error. After that the account has to be added again. The same happens with proxies whose IP changes every few minutes.
One session means one place. Once you've handed the account to a program, don't open the same tdata or session anywhere else.
How not to lose an account
- Don't send tdata and session to strangers and don't upload them to unverified services and bots.
- Enable a cloud password (2FA). It won't neutralize a key that's already been copied, but on a new device a code alone won't get into the account.
- If you bought an account, change the cloud password and end the seller's sessions after a day.
- Keep a permanent proxy for the account in the same country as the number.
How TG Combine accepts accounts
The service detects the format itself and accepts up to 500 accounts at a time: tdata in a .zip archive (one archive can hold several accounts, each in its own folder), .session from Telethon and Pyrogram, session strings, auth key with the data center number, .json with a session, or login by number. The tdata passcode is entered in a separate field on the form.
The service doesn't store the files: it pulls out the key, saves it encrypted, and deletes the unpacked archive right away. After adding, it checks that the account is alive and not frozen, gives it a rest period of 2–24 hours, and starts the warm-up with a quiet start.
It protects against the seller taking the account back like this: it sets its own cloud password right away and ends other sessions after 24 hours, because Telegram doesn't allow it any earlier. Each account works in the service through one connection, so the service itself doesn't create duplicate keys.
An account needs a proxy to work: accounts don't connect to Telegram directly from our server. If you want to upload files with no commitment, start with the free trial plan. And what to do when an account does get restricted is covered in the articles about the spam block and about the account freeze.
Frequently asked questions
What is tdata in Telegram?
A Telegram Desktop folder with the auth key. An account opens with it without a code or cloud password, so treat it like a password.
What is an auth key?
The secret Telegram uses to recognize your device. It replaces both the SMS code and the cloud password, so a leaked key means a lost account.
How do I log in to Telegram via tdata?
Get the portable Telegram Desktop, replace its tdata folder with yours, and launch Telegram.exe. No code needed, and if a passcode is set on the tdata, the program will ask for it.
Can I log in via tdata from a phone?
No, a phone can't read the tdata format. Open the folder on a computer in Telegram Desktop and log in on the phone by number with the code from Desktop.
How do I use session and json?
You upload .session to a program or cloud service, and it pulls out the key itself. .json usually just describes the account: number, device and sometimes the cloud password.
Do I need a tdata to session converter?
Only if your program reads just one format. It's better not to hand files to someone else's online converters, and TG Combine works without any conversion.
How do I view and end active sessions in Telegram?
Open "Settings → Devices" and tap "Terminate all other sessions". If you logged in on this device less than a day ago, the button won't work until 24 hours have passed.
Why does an account fail after logging in via tdata or session?
Three common reasons: the key works in two places at once (AUTH_KEY_DUPLICATED), the proxy changes IP, and the seller still has a working copy of the session with an active login.