Whitelisting affects GET requests. Update limits affect POST requests. Update limits are applied on a per-user basis regardless of whitelisting status. I will update that doc to make this clear. Thanks, Doug
On Wed, Jun 3, 2009 at 11:38 AM, jmathai <[email protected]> wrote: > > Thanks for the response Doug. Would be great to have a specific > response code for exceeding rate limits since using string matching is > bound to fail in the future. > > I have a question about the rate limiting though. I'm making these > requests from a whitelisted IP. If we are calling direct_messages/new > on behalf of user FOO then are we limited to the 1,000/day user update > limit, the 100/day user API limit, or the 20,000/day whitelisting > limit for our IP. > > The docs lead me to believe it's the 20,000/day whitelisting limit for > our IP. The actual behavior makes me believe its the 1,000/day user > update limit. I thought the docs were unclear (or incorrect) > regarding which takes precedence. > > From http://apiwiki.twitter.com/Rate-limiting: > > "IP whitelisting takes precedence to account rate limits. Requests > from a whitelisted IP address made on a user's behalf will be deducted > from the whitelisted IP's limit, not the users. Therefore, IP-based > whitelisting is a best practice for applications that interact with > many users' data." > > I'm fairly certain that I'm not hitting the 20k limit because I'm > logging all calls from our application. However, I still get the > message mentioned above. > > On Jun 3, 11:19 am, Doug Williams <[email protected]> wrote: > > You are not being rate limited. You are hitting the update limits as > > indicated by the 403. If you look at the body of the returned data, it > will > > tell you this error condition. > > I've updated the friendships_create, direct_messages/new, and > > statuses/update method documentation to mention that we throw a 403 in > this > > case. > > Thanks, > > Doug > > Twitter API Support > > > > On Tue, Jun 2, 2009 at 8:36 PM, jmathai <[email protected]> wrote: > > > > > Working within the rate limits is a really big pain in the tail :). > > > > > Had to get that off my chest. The issue I'm seeing is that I'm > > > getting the following response with a 403 code. > > > > > {"request":"\/direct_messages\/new.json","error":"There was an error > > > sending your message: You can't send direct messages to this user > > > right now"} > > > > > Per the docs it should return a 400 for rate limited responses. This > > > way it's impossible for me to determine if the action isn't allowed or > > > if it's just rate limited. Is this a bug or am I misreading the docs? > > > > >http://twitterapi.pbworks.com/HTTP-Response-Codes-and-Errors >
