skip to Main Content

I was having an issue with my script crashing on a message undefined error which was answered here: TypeError: Cannot read property 'message' of undefined – Twitter API

It turned out that when hitting a rate limit, the error message is delivered differently thus console.log('Try Favorite - ', err[0].message); would return an error unless changed to console.log('Try Favorite - ', err.message);.

It now outputs as [[Apr 28 22:26:01.024]] [LOG] Try Favorite - HTTP Error: 429 Too Many Requests which suggests a rate limit, however, I’m not finding a clear rate limit.

All documentation for POST limits state 1000, however, I’m counting a total of 22 over the course of the lat 8 hours, so its strange that its being rate limited.

Does anyone have any more clear documentation? All links I find seem to be dead.

I might add as well,that ONLY favorites are being affected, all other requests are working fine.

EDIT: Adding output of recent. Undefined will be You already ____ed this tweet, however, due to a temporary change to keep the app from crashing, message is undefined.

[[Apr 28 23:57:00.560]] [LOG]   Try Favorite -  HTTP Error: 429 Too Many Requests
[[Apr 28 23:57:00.562]] [LOG]   Try Favorite -  HTTP Error: 429 Too Many Requests
[[Apr 28 23:57:00.563]] [LOG]   Try Favorite -  HTTP Error: 429 Too Many Requests
[[Apr 28 23:57:00.564]] [LOG]   Try Favorite -  HTTP Error: 429 Too Many Requests
[[Apr 28 23:57:00.575]] [LOG]   Try Favorite -  HTTP Error: 429 Too Many Requests
[[Apr 28 23:57:00.578]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.583]] [LOG]   Try Favorite -  HTTP Error: 429 Too Many Requests
[[Apr 28 23:57:00.584]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.589]] [LOG]   Try Favorite -  HTTP Error: 429 Too Many Requests
[[Apr 28 23:57:00.592]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.593]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.599]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.604]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.609]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.619]] [LOG]   Retweeted: https://twitter.com/username/status/90374******24768
[[Apr 28 23:57:00.634]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.671]] [LOG]   Try Retweet -  undefined
[[Apr 28 23:57:00.754]] [LOG]   Try Favorite -  HTTP Error: 429 Too Many Requests
[[Apr 28 23:57:00.800]] [LOG]   Favorited:  https://twitter.com/username/status/99037*******48615

EDIT: Informed that I’m visibly exceeding rate limits, however this issue has only presented itself today while working for 5 days prior. As well retweets are still returning You have already retweeted this tweet while favorites are returning Status 429.

EDIT: Attempted on another test user with only statuses/retweet requests, went through fine. Attempted with a different test user (to avoid last test usage) favorites/create and it runs for first interval, then immediately rate limits after the 2nd request at 5 requests per 2 minutes, which means I’m being limited at 7 favorites/create requests per 4 minutes.

This leads me to believe there is a specific limit with favorites, however, still unclear while this exact interval was working for 5 days prior.

2

Answers


  1. Chosen as BEST ANSWER

    There doesn't necessarily seem to be any documented favorites/create specific limitations, however, everything seems to be okay today. Not totally clear what had occurred as there were no updates posted to the Twitter System Status page.

    The current technical limits of POST requests for accounts are:

    • Direct Messages (daily): The limit is 1,000 messages sent per day. Tweets: 2,400 per day. The daily update limit is further broken down into smaller limits for semi-hourly intervals. Retweets are counted as Tweets. Changes to account email: 4 per hour.
    • Following (daily): The technical follow limit is 1,000 per day. Please note that this is a technical account limit only, and there are additional rules prohibiting aggressive following behavior. Read about following limits and prohibited behavior.
    • Following (account-based): Once an account is following 5,000 other accounts, additional follow attempts are limited by account-specific ratios. These limits include actions from all devices, including web, mobile, phone, API, etc. API requests from all third-party applications are tracked against the hourly API limit. People who use multiple third-party applications with their account will therefore reach the API limit more quickly.

    These limits may be temporarily reduced during periods of heavy site usage. In such cases, we will post an update on the Twitter status site.

    This being said, it seems likely that limits were reduced at the time but unreported.

    As well, see Marco's answer above for useful information on the Premium APIs.

    GET Rate Limits can also be found here, and are a bit more expanded on, however documentation doesn't state that individual POST options are limited anymore than others.


  2. According to twitter documentation, the limit for standard accounts is 15 requests per rate limit window, which is 15 minutes. So if you’re sending 22 requests in less than 15 minutes, you’re exceeding the limit.

    Rate limiting of the standard API is primarily on a per-user basis —
    or more accurately described, per user access token. If a method
    allows for 15 requests per rate limit window, then it allows 15
    requests per window per access token.

    When using application-only authentication, rate limits are determined
    globally for the entire application. If a method allows for 15
    requests per rate limit window, then it allows you to make 15 requests
    per window — on behalf of your application. This limit is considered
    completely separately from per-user limits.

    If you wish to increase your limits checkout premium APIs

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search