Developer documentation

TDLib requests, state, options and notifications

Handle asynchronous requests, updates, options and notification groups with reliable history and UI state.

GetTGAPI editorial teamUpdated
Documentation notesReviewed

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

On this page
  1. Responses and unsolicited updates both matter
  2. Options have types and version scope
  3. Connect notification groups to the OS
  4. Implementation recommendations

Responses and unsolicited updates both matter

TDLib’s main interface is asynchronous. Correlation depends on the binding; JSON uses @extra. Unsolicited updates also drive state. History responses can contain fewer items than requested, so continue with the appropriate cursor when more history is needed.

Options have types and version scope

Options are typed, and undocumented names can be ignored. The documented application-specific naming range can store small values, but should not replace a full business database or secret store.

Connect notification groups to the OS

TDLib manages notification-group changes; the application renders system notifications. Dismissing a notification does not mark a conversation read. The introductory notification article originated with an older release, so verify current fields against the matching schema.

Implementation recommendations

Keep consuming updates and isolate client instances by account. Wait for complete closure before cleanup. Use stable notification IDs during restoration. Find generated API signatures through the method and type index.