Hi,
Thanks for the reply.
To answer your specific question, the call we are making is POST friendships/create.
Now to clear up some confusion: Twitter has just updated the documentation for that method (friendships/create) declaring that it is in fact Rate limited. This however was not the case a week or so ago (before the documentation site had the facelift - which is very nice by the way). Previously (and we are only talking weeks), the friendships/create documentation specified that there was no rate limiting (it literally had “Rate Limited : No” in the documentation for that call). So, the quote I gave you no longer applies, due to Twitter changing this in the last week or so. Might I add, that I have been chasing this issue up with support for a few weeks, and during the inception of the conversation, the documentation had not been updated. I even have a reply from Twitter support staff stating that friendships/create is not rate limited, which confirms that this was previously the case, and the documentation only changed recently.
Regardless, let’s put that aside for a moment, as it isn’t relevant now. Let’s focus on what is true now.
You have now informed us that the friendships/create endpoint is rate limited. We have no problem with that. The problem we have is, the list of Rate limited requests supplied here: https://dev.twitter.com/rest/public/rate-limits does not define a rate limit for friendships/create. Nor does making a call to https://dev.twitter.com/rest/reference/get/application/rate_limit_status - as per your suggestion - supply a limit for friendships/create. I tested it, and this is what was returned for the friendships resource family:
“friendships”: {
"/friendships/outgoing": {
“limit”: 15,
“remaining”: 15,
“reset”: 1410441483
},
"/friendships/no_retweets/ids": {
“limit”: 15,
“remaining”: 15,
“reset”: 1410441483
},
"/friendships/lookup": {
“limit”: 15,
“remaining”: 15,
“reset”: 1410441483
},
"/friendships/incoming": {
“limit”: 15,
“remaining”: 15,
“reset”: 1410441483
},
"/friendships/show": {
“limit”: 180,
“remaining”: 180,
“reset”: 1410441483
}
}
As you can see rather clearly, friendships/create is not specified in the API call you suggested. And nor is it specified in the list of Rate limited endpoints as described earlier.
We have tried our best to be responsible in our provisioning of API access to our users. And for all the endpoints that have specified limits, we have implemented limiting on our users so they cannot breach these limits. Importantly, we can do this because the limits are explicitly documented by Twitter. There is no grey area. If a user reaches their limit, we cut them off. However, for friendships/create, we can’t get a straight answer from anyone as to what the limit is.
To make matters worse, when our users’ made lots of calls (lots meaning 250 per day at absolute most) to friendships/create when we went live, we did not receive the standard 429 declaring that we had hit any formal rate limit. Instead, we received a 403 with no headers telling us anything (let’s call this ‘pseudo rate limiting’ for the sake of clarity from here on). And, once we got ‘pseudo rate limited’, all of our users where rate limited, including new users that signed up while we were in this ‘pseudo rate limited’ state, even though these new users had never made a request through our application. Further evidence that this was not standard rate limiting, was that the rate limiting was removed after around 24 hours, rather than after the standard 15 minute or 180 minute windows.
FYI, I am not calling it ‘pseudo rate limiting’ to be facetious, rather, I am calling it that because it does not fit the profile of a proper 429 type of rate limit response which Twitter documents quite thoroughly. It’s just a 403, with a JSON blob that had something along the lines of ‘You cannot follow any users at this time’ (this is not verbatim).
So, the questions that need to be answered are:
-
Given the documentation now says the friendships/create method is rate limited, and these limits are not documented anywhere, how do we proceed to rectify this and stop our application from being ‘pseudo rate limited’ (or even stop our application from being rate limited at all)? If you would kindly tell us what these formal limits are, or where we can find them, we would easily be in a position to limit our users from breaching any limits.
-
Can you tell us how one or more users breaching this nebulous limit would cause other users to also be ‘pseudo rate limited’, given the API request to POST friendships/create is made under the authentication context of a User, and not the Application alone, meaning only the naughty users would be limited, rather than every user being rate limited, even ones that have just signed up and haven’t made a request.
I apologize for the lengthy response, but your reply was the first ‘non-canned response’ we have received from Twitter, and we are really hoping you can explain to us what is going on, and how we can fix it. As a social media agency, we have invested substantial amounts of capital into this project, and we can’t afford to just turn it off due to some possible misunderstandings, most likely on our part.
Regards, Emir