tdlib-obf API
Reference documentation for the public tdlib-obf API, generated from TDLib schemas and public headers
Loading...
Searching...
No Matches
tdlib-obf API

TDLib API Reference

This is the canonical API reference entry point for tdlib-obf.

Integrator Entry Points

  1. Custom Client Integration Guide is the practical runtime contract for client integration, proxy behavior, and deployment expectations.
  2. API Documentation Workflow explains how API docs are generated and where to edit source-of-truth comments.
  3. Public API Surface Policy defines which headers and pages are included in the published API set.

High-Value Entry Paths

  1. Authorization and session lifecycle: follow updateAuthorizationState and apply setTdlibParameters when authorizationStateWaitTdlibParameters is reached.
  2. Updates and caching model: treat updateNewChat as the cache-seeding update, use loadChats for incremental list synchronization, and consume updateFile for transfer-state updates.
  3. Proxy and network configuration: use addProxy/enableProxy with proxyTypeMtproto for MTProto proxy routing, and configure resolver behavior through getOption("dns_type") / getOption("custom_dns_url").
  4. Generated object model basics: edit generated API descriptions in td/generate/scheme/td_api.tl; generated objects in td_api.h are produced from that schema.

Which Interface Should I Use

  1. Use td_api (td/generate/scheme/td_api.tl) when integrating through TDLib object APIs.
  2. Use tdjson (td/telegram/td_json_client.h) when integrating from non-C++ runtimes.
  3. Use generated Java and .NET bindings for language-native integration artifacts.

Source Of Truth

  1. Generated TDLib API docs are sourced from td/generate/scheme/td_api.tl.
  2. Public C++ and C surfaces are sourced from curated public headers in the Doxygen input allowlist.
  3. Generated td_api.h comments are injected by td/generate/doxygen_tl_docs.py.

Published Artifacts

  1. Doxygen HTML (canonical): build/docs/api/html/index.html.
  2. Java and Android compatibility outputs are generated by dedicated binding targets.
  3. .NET XML compatibility output is generated by the .NET binding target.

Contributor Workflow

  1. Generate docs: cmake --build build --target td_generate_api_docs.
  2. Review rendered output under build/docs/api/html/index.html.
  3. For generated API docs, update td/generate/scheme/td_api.tl comments and regenerate.

Public Surface Policy

See docs/api/public_api_surfaces.md for the curated public allowlist and excluded internal headers.