Account suspended even though rate-limit was not exceeded




I am trying to build a twitter App with python. I am trying to access user data with the API using the URL


The rate limit is 180 per 15min. To comply with the rate-limit I built a loop

while True:
        ## Code for accessing Twitter 
        headers =
        print 'Remaining', headers['x-rate-limit-remaining']

        ##Code for saving the information

        print "waiting for 15min since " +
        time.sleep(900) # delays for 900 seconds = 15min

I can see that my rate-limit is not exceeded because int(headers['x-rate-limit-remaining']) is larger than 1. However my program aborts and my account is suspended even though I have only been downloading very little information. {"errors": [{"message": "User has been suspended.", "code": 63}]}
Is there a reason behind this?



My only guess is that the time to wait is not exactly 15 minutes but rather a little bit longer. But to be honest this is a very vague guess.


Hi Yeikel,

thanks for your reply. The program already stopped when I ran the first loop. I could see that my rate limit was about 100 (so I had looked into 80 accounts) so the program had not hit any rate-limit…

Is there an “additional rate limit” to the 180 posts/15min?


Does this relate to the account under which you were running your app, or is it an error from the users/show.json endpoint relating to the account you were querying?


Hi Andy,

great! I tried to read a different account and it worked, i.e. the account I wanted to look into was suspended. Then I caught the error with try+except. Many thanks!!