bear / python-twitter

A Python wrapper around the Twitter API.
Apache License 2.0
3.41k stars 955 forks source link

Getting "Forbidden" when using RetweetAPI #644

Open Yicong-Huang opened 4 years ago

Yicong-Huang commented 4 years ago

I am using GetRetweets with a cron job set to be a frequency of <5 usages per minutes (13 seconds each), which is lower than the rate limitation set by Twitter, (75 in 15 minutes).

However, after 1 hour of running this Api, I will get the following TwitterError:

[{'code': 200, 'message': 'Forbidden.'}]

I could not find such error code in the doc. I do find Forbidden with error cord 403 but not 200.

And Twitter API instance is fine with other calls like GetStreamFilter at the same time, just GetRetweets is failing. So my API key or IP is not banned.

If I restart the process immediately with the same code, it will not return Forbidden. but if I try to use a while loop to retry sending this API with the same process, it will constantly gives Forbidden. This is another indicator that my API key is not banned.

Any help would be appreciated!

tugrulz commented 3 years ago

same here