Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter api - no more than 150 requests per hour

I am writing a twitter app using jtwitter - and its running inside a server inside my work. Anyway - whenever i run it from work it returns the error below and I am only making a couple requests per hour:

HTTP/1.1 400 Bad Request
{"request":"/1/statuses/user_timeline.json?count=6&id=cicsdemo&","error":"Rate limit exceeded. Clients may not make more than 150 requests per hour."} ]
2010-06-03 18:44:49 zero.timer.TimerTask::run Thread-3
    SEVERE [ CWPZA3100E: Exception during processing for timer task, "twitterTimer". Exception: java.lang.ClassCastException: winterwell.jtwitter.Twitter$Status incompatible with java.lang.String ]

I run the same code from home - its fine.

So obviously at some point twitter thinks our work is all coming from one direct IP - which is why its hitting a limit which it shouldnt.

Do I have any choice or workaround - can i make the limit be counted from my direct machine IP - or to my account instead of IP? Can i use a proxy? Has any body else had this problem and solved it?!

Before anyone asks the APP must live inside my work - it cannot run anywhere else!

Cheers,

Andy

like image 200
RenegadeAndy Avatar asked Jun 03 '10 17:06

RenegadeAndy


People also ask

How many requests can you make in Twitter API?

1500 requests/15-min window (app-auth) 100,000 requests/24-hour window (application level)

How do I stop the rate limit exceeded on Twitter?

try not to over use the refresh button - this will cost you 3 calls per click (All Tweets, Replies & DMs) UPDATE: try lowering the total % in the settings window, twitter API tab to around 60-70% - you'll get less frequent updates but you'll use less API.

How do I change my API rate limit?

Click Edit Rate Limit. Select Unimited to allow unrestricted calls to the API, or select Custom Rate Limit to define the required rate limit; use the supplied fields to define the maximum number of calls allowed in a specified time period; for example, 100 calls per 1 minute. Click Submit when done.


Video Answer


1 Answers

Authenticate against an account so that you're using the account's API request limit, not the unauth'd IP limit:

http://dev.twitter.com/pages/rate-limiting

http://dev.twitter.com/pages/auth

If you still have issues, you can ask for whitelisting of the company IP, but for what you're talking about (only a few requests an hour), just auth'ing to an account is the best option.

like image 200
Amber Avatar answered Sep 28 '22 20:09

Amber