- Tdata is the folder where Telegram Desktop keeps your login. Put it next to the portable version of the app and the account opens with no phone number and no code.
- To move the account to your phone, sign in on the phone with the account's number. The code arrives not by SMS but in the «Telegram» chat on the computer where the account is already open. The whole thing takes about ten minutes.
- Set your own cloud password and a recovery email straight away. Then, after 24 hours, end the tdata session from your phone and sign the computer back in with a QR code, because the seller may have kept a copy of the folder.
After buying an account you usually get an archive with a folder full of cryptic files such as key_datas and D877F783D5D3EF8C. This is not some special seller format. It is the ordinary working folder of Telegram Desktop, Telegram's official computer app. Inside sits the authorization key, the record by which Telegram's servers recognise a device that is already signed in. That is why the app opens straight into the account when you give it someone else's folder, and no SMS is needed.
That leads to the main rule. Unless the folder has a local passcode, anyone with a copy can read your chats and write in your name. So do not upload tdata to online services or bots that promise to "check" or "fix" an account. You would be handing them exactly what you paid for.
Which format is in your archive?
Telegram account listings often say "tdata + session + json". If you are going to chat or run a channel yourself, the only thing you need from that bundle is the tdata folder. The other files are read by programs that talk to Telegram through its API, and the official apps cannot open them. Look at what is in your archive and find your case on the chart.
A tdata folder
The easiest format when a person will use the account. It opens on a computer in a minute and moves to a phone from there.
- tdata folder
- cloud password in a .txt, if set
- sometimes a local passcode
You need Telegram Desktop from desktop.telegram.org specifically. Telegram also makes a separate Mac app simply called "Telegram". That is a different client with its own way of storing data, and it will not read a tdata folder.
If the account has a cloud password, the seller puts it next to the folder in a text file. Save it right away. The folder itself does not contain it, and without it you cannot sign in on a phone or another computer. Accounts in this format are listed in the tdata and session catalog, with the format written right in the product name.
Session and json
This is the working format of programs that connect to Telegram through its API, such as scripts built on the Telethon library. The regular Telegram apps cannot open these files.
- .session file
- .json file
- for programs, not people
A .session file is a small SQLite database. It holds the same authorization key plus the address of the Telegram server, as the Telethon documentation describes. In the json file sellers record which device the account claimed to be when it signed in: the model, system and app versions, the language, and often the phone number and cloud password too. This is a seller convention rather than a Telegram standard, so the contents vary from seller to seller.
Bought only session and json, but planned to use the account in ordinary Telegram? Message the seller before the warranty runs out and ask for tdata or a code login. I would not run the files through third-party converters, because you would have to hand them the key to the account. And if you wanted a session for your own bot, you do not need an account at all: a bot runs on a token from Telegram, and I covered how to launch one in the guide to choosing a server for a Telegram bot.
Number and code
The seller gives you a phone number and a link where the login code appears. You sign in to the official app yourself, just as you would with your own account.
- phone number
- link to the code
- cloud password, if set
Here the SIM card stays with the seller, and the code link only works for a limited time. If you ever get logged out of every device, you will not be able to sign back in by SMS. That is why in this format the cloud password and recovery email belong in the first few minutes, not "some time later".
Five problems worth catching in the first few minutes
Shop warranties are usually short, and the exact period is shown on the product card. Run through these checks as soon as you get the archive, while the seller still has to replace a bad account.
- The account will not open
Telegram Desktop starts but asks for a phone number instead of showing chats. The key in the folder no longer works: the session was ended or the account was banned. Message the seller straight away.
How to tell: right after you launch the app with the seller's folder, you see the login screen with a phone number field. - No local passcode was supplied
If the folder has a local passcode, the app will not even show the chat list without it. There is no way around it except logging out, and that throws away the tdata login too.
How to tell: on launch the app shows a window with a single passcode field, and the archive has no passcode. - An unknown cloud password
The account opens on the computer, but after the code the phone asks for a password you were never given. Without it you cannot move the account to the phone or change its protection.
How to tell: in Telegram Desktop, Settings → Privacy and Security shows Two-Step Verification as on, and there is no text file with the password in the archive. - Other people's devices are still listed
The seller's or previous owners' sessions can see every chat. On top of that, any of them can request a cloud password reset, and Telegram resets it after 7 days unless someone cancels the request.
How to tell: Settings → Devices shows entries other than your computer, with devices and cities you do not recognise. - A "clean" account that is spam-limited
A limited account cannot message people who do not have it in their contacts. If it was sold as having no limits, ask for a replacement.
How to tell: send /start to @SpamBot. If it replies that the account is limited, the account has a spam block.
How to sign in with tdata and move the account to your phone
Here is the whole route from the archive to an account that only you control. The first three steps happen on the computer, and after that you will need your phone.
- Download portable Telegram Desktop
On Windows, get the Portable version from desktop.telegram.org and unpack it into a new, empty folder. The portable version keeps its data next to itself, so your personal account on this computer stays untouched.
- Put tdata next to the app
On Windows, Telegram Desktop looks for the tdata folder in the same place as Telegram.exe. On macOS and Linux the data lives in a system folder in your user profile, so it is easier to start the app with the
-workdiroption. It points the app at a separate working folder, and you do not have to swap out your own account's data.# Windows, portable version D:\tg\account-1\Telegram.exe D:\tg\account-1\tdata\ # folder from the archive # where your own account lives (leave it alone) %APPDATA%\Telegram Desktop\tdata ~/Library/Application Support/Telegram Desktop/tdata ~/.local/share/TelegramDesktop/tdata # macOS: a separate working folder mkdir -p ~/tg/account-1 && cp -R tdata ~/tg/account-1/ /Applications/Telegram.app/Contents/MacOS/Telegram -workdir ~/tg/account-1 # Linux: the same idea telegram-desktop -workdir ~/tg/account-1 - Launch the app and check the account
If the app asks for a local passcode, enter the one from the archive. If your chats appear, the login works. Now go through the five problems above while the warranty is still running.
- Sign in on your phone
Install the official Telegram app and enter the account's number. The code will not come by SMS but to the «Telegram» chat on the computer, because the account is already open there (this is described in Telegram's FAQ). If a cloud password is set, the app will ask for it after the code. Do not log out on the computer until the phone is in, since right now it is your only way into the account.
- Set your own cloud password and email
In the app, open Settings → Privacy and Security → Two-Step Verification. If there was a password, change it to your own; if there was none, create one. On the same screen add a recovery email, because it is the only way to recover a forgotten password without the week-long wait. Use a mailbox you are sure you can always get into.
- End other sessions from the computer
In Telegram Desktop, open Settings → Devices and end every entry except this computer and your phone. The phone cannot do this yet, because Telegram does not let a session younger than a day end other sessions. The tdata session is usually older. If Telegram still refuses, the seller created it recently, and you will have to wait.
- A day later, end the tdata session itself
The seller may have kept a copy of the folder, and to Telegram that copy is the very same session you have on your computer. So 24 hours after signing in on the phone, use the phone to end the Telegram Desktop session. Then choose QR code login on the computer and scan it with the phone under Settings → Devices. The computer gets a fresh key that only you know about.
Do you still need the old tdata folder? No. After step seven it no longer opens anything, and you can delete it along with the archive.
Do not change the order of steps 5 to 7. Until a cloud password is set, anyone holding a copy of the folder can set one first, and then you will not be able to change the account's protection.
The tdata paths and the -workdir option were checked against the Telegram Desktop source code, and the rules for codes, cloud passwords and sessions come from telegram.org and core.telegram.org documentation as of 26.10.2026. Menu names may differ slightly between app versions.