Developer documentation

Telegram data export, history import and account deletion

Distinguish export, import, logout and account deletion with scoped confirmation and verifiable completion.

GetTGAPI editorial teamUpdated
Documentation notesReviewed

Based on official sources and independently maintained by GetTGAPI. Documentation and glossary →

On this page
  1. Export the scope the user selected
  2. History import is a dedicated flow
  3. Account deletion is not logout
  4. Implementation recommendations

Export the scope the user selected

Takeout uses a dedicated session and wrapped queries, followed by completion or cancellation. Data categories and media limits should match the chosen scope rather than silently expanding to everything.

History import is a dedicated flow

Validate the file and destination, initialize the import, upload media and finalize it. Imported messages carry origin metadata and should be distinguishable from live messages. Destination permissions and confirmation are part of the flow.

Account deletion is not logout

Deletion can be immediate or depend on password and delay conditions. It is never a fallback for cleaning up a client session. Retention, current-device logout and account deletion need separate controls and confirmation language.

Implementation recommendations

Show scope and destination first, provide progress and cancellation, and reconcile completed and failed items. Protect exported files and provide cleanup. Read the official API terms before distributing a client; this operational guide does not replace them.