Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request limits through libtdjson #3167

Closed
gmb15551 opened this issue Dec 5, 2024 · 1 comment
Closed

Request limits through libtdjson #3167

gmb15551 opened this issue Dec 5, 2024 · 1 comment

Comments

@gmb15551
Copy link

gmb15551 commented Dec 5, 2024

This week, I installed the libtdjson library and am trying to understand its principles of operation. As far as I know, when working with the Bot API, there are limits on requests. In this regard, I would like to ask the following questions.

  1. Are there any request limits when working with libtdjson (for example, limits on the frequency of calling the getChatHistory function)?
    Are these limits automatically controlled by the libtdjson library? Does it simply return an error if the limits are exceeded, or does it queue the request and send it when possible?
  2. Am I correct in understanding that the library automatically handles all tasks that may be required for its operation? The user of the library only needs to solve two tasks: update the graphical interface when receiving Update-type messages, and send information about user actions (sending messages, etc.) to the library. Does the rest get handled automatically by libtdjson?
@levlam
Copy link
Contributor

levlam commented Dec 5, 2024

  1. TDLib has no limits. All limits are server-side and can be triggered only if the request can't be answered using local data. If server-side limits are exceeded TDLib will do a reasonable amount of retries before returning an error 429 to the app.

  2. Yes, this is correct for most updates and methods. Also, apps may need to get some data from TDLib to display, for example, messages or full user profile info, but most required data are received through updates.

@gmb15551 gmb15551 closed this as completed Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants