# Converter

The Converter module converts between TData (Telegram Desktop) and session formats. Use it to import accounts from Telegram Desktop or export your accounts as TData for use with other tools.

![Converter settings](/files/lUhztWdGeaROzPG68sVo)

## Settings Reference

| Setting     | Description                                                                                                                            |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Mode**    | Conversion direction: **TData -> Session** (import from Telegram Desktop) or **Session -> TData** (export to Telegram Desktop format). |
| **Threads** | How many conversions to run at the same time. Default: 3.                                                                              |

## Mode 1: TData -> Session

Converts Telegram Desktop data folders into MVS Web accounts.

### How to Use

1. Place your TData folders in the `data/TDATA/` directory inside the MVS Web folder
2. Each folder should be named with the phone number and contain a `tdata/` subfolder
3. Open the **Converter** module
4. Select **TData -> Session** mode
5. Click **Start**

The converter will read each TData folder and create an account in the database with status **new** and source **converted**.

{% hint style="info" %}
If there is a `password.txt`, `twoFA.txt`, or `2fa.txt` file inside the account folder (or any subfolder), the converter will automatically read the 2FA password and store it with the account.
{% endhint %}

## Mode 2: Session -> TData

Exports your accounts from the database to Telegram Desktop format.

### How to Use

1. Open the **Converter** module
2. Select **Session -> TData** mode
3. In the **Accounts** section, select the accounts you want to export
4. Click **Start**

For each account, the converter creates a folder in `data/TDATA/` containing:

| File              | Description                                                                  |
| ----------------- | ---------------------------------------------------------------------------- |
| `tdata/`          | Telegram Desktop session data (can be loaded directly into Telegram Desktop) |
| `{phone}.session` | Telethon session file (compatible with any Telethon-based tool)              |
| `{phone}.json`    | Account metadata: app\_id, device info, 2FA password, username, etc.         |
| `password.txt`    | 2FA password (only if the account has one)                                   |

{% hint style="info" %}
After exporting, accounts are marked as "exported" in the system. You can filter by export status on the Accounts page.
{% endhint %}

## Understanding the Results

| Result                   | What It Means                                                          |
| ------------------------ | ---------------------------------------------------------------------- |
| **Converted: {phone}**   | Successfully converted. If 2FA was found, you will see a "\[2FA]" tag. |
| **Failed to read tdata** | The TData folder is corrupted or in an unsupported format.             |
| **No auth\_key**         | The account does not have a valid session to export.                   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mvs-3.gitbook.io/mvs-docs/modules/converter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
