Limits testing auth.sendCode in the telegram.org API
<p>Does the telegram server have a limit on the number of times a client can call auth.sendCode to receive a new <code>phone code</code>?</p>

<p>While testing I have to make this call many times until I get my code fully debugged, but it seems to be limited to maybe three invokations per day (or less in some cases). After making the auth.sendCode method call I receive a response that seems ok:</p>

<pre><code>('sentCode: ', {u'req_msg_id': 6330970917330544640L, u'result': {u'phone_code_hash': '7140824e8db63141ab', u'type': {u'length': 5}, u'next_type': {}, u'flags': 3, u'phone_registered': True}})
</code></pre>

<p>But after receiving a new <code>phone code</code> several times it stops sending me anything, as if it is ignoring my request for a new <code>phone code</code>. Today it only worked once before ignoring further <code>phone code</code> requests. Last week I was able to receive five new <code>phone codes</code> before it ignored my requests.</p>

<p>If this is a limit imposed by the server is there a way to reset it so I can continue debugging my client code?</p>

<p>You can try this out with telegram on your phone to see how many times you can do a request for phone_codes from the same number before it stops responding.</p>

<p>Also, during testing ensure that you are using the range of test IP addresses not the live IP addresses.</p>

<p>During my testing I received way over 3 phone codes per day all on the same number and I never ran into any limits, however that was on Layer 42. Today we are layer 55. What layer are you presently working with?</p>

<p>Keep in mind too that of recent telegram has been under several DoS attacks so if your client looks like its doing something fishy then it is indeed possible that some restrictions have now been put in place :(</p>

<p>One more thing , from your Phone, look for the menu option that shows you the number of active sessions you currently have open, and close all the ones you done need.</p>

<p>That might also help narrow down your issue.</p>

python api telegram