I have a question about contacts.ResolvePhone rate limits and caching behavior.
I'm using the telegram (gramjs) client in Node.js, and I call client.invoke(new Api.contacts.ResolvePhone({ phone })) in a loop to check a list of phone numbers. I already added a small delay (setTimeout ~500ms) between requests.
What I’m seeing is that after some time, the API keeps returning the same kind of response for different numbers, even for phone numbers that I know have a Telegram account. It looks like my account / api_id is being rate limited or put into some kind of degraded state, and the responses are no longer reliable.
My questions are:
Is there an official or recommended way to respect Telegram’s rate limits for contacts.ResolvePhone?
How should I correctly handle FLOOD_WAIT_X and other rate limit errors when using gramjs?
Are there any documented per-account or per-api_id limits for resolving phone numbers (e.g. number of calls per minute/hour)?
Does using a Premium account change anything about these limits, or is it exactly the same for API calls?
If needed, I can share a minimal code sample, but in short I’m just iterating over a list of numbers and calling contacts.ResolvePhone for each one.
Any guidance or best practices for safely using this method without getting rate limited or getting “stuck” responses would be really appreciated.
I have a question about contacts.ResolvePhone rate limits and caching behavior.
I'm using the telegram (gramjs) client in Node.js, and I call client.invoke(new Api.contacts.ResolvePhone({ phone })) in a loop to check a list of phone numbers. I already added a small delay (setTimeout ~500ms) between requests.
What I’m seeing is that after some time, the API keeps returning the same kind of response for different numbers, even for phone numbers that I know have a Telegram account. It looks like my account / api_id is being rate limited or put into some kind of degraded state, and the responses are no longer reliable.
My questions are:
Is there an official or recommended way to respect Telegram’s rate limits for contacts.ResolvePhone?
How should I correctly handle FLOOD_WAIT_X and other rate limit errors when using gramjs?
Are there any documented per-account or per-api_id limits for resolving phone numbers (e.g. number of calls per minute/hour)?
Does using a Premium account change anything about these limits, or is it exactly the same for API calls?
If needed, I can share a minimal code sample, but in short I’m just iterating over a list of numbers and calling contacts.ResolvePhone for each one.
Any guidance or best practices for safely using this method without getting rate limited or getting “stuck” responses would be really appreciated.