Client error (429)




I got client error (429) as mentioned in the link below it’s related to API rate limits:

I waited for more than 15 minute and still I’m getting the same error!

This is my code:

   let statusesShowEndpoint = ""
        params = ["screen_name": user]
        request = client.URLRequestWithMethod("GET", URL: statusesShowEndpoint, parameters: params, error: &clientError)
        client.sendTwitterRequest(request) { (response, data, connectionError) -> Void in
            if connectionError != nil {
                print("Error: \(connectionError)")
            guard let myData = data else {
                print("error nil")
            let json = JSON(data: myData)
            print("json \(json)")
            self.followingIDs = json["ids"] { $0.intValue}             

Here is the error:

Error: Optional(Error Domain=TwitterAPIErrorDomain Code=88 "Request failed: client error (429)" UserInfo={NSLocalizedFailureReason=Twitter API error : Rate limit exceeded (code 88), TWTRNetworkingStatusCode=429, NSErrorFailingURLKey=, NSLocalizedDescription=Request failed: client error (429)})

Any suggestion?



As this is an API question and not related to Fabric, switching this to the correct forum.


Ok @bonnell thanks but maybe there is an error in my code?


If you’ve waited 15 minutes, and still getting Rate Limit errors - try waiting an extra few seconds longer - but like you said, if you’re waiting more than 15 minutes and still getting errors it could be something else.

I don’t know swift (is that swift?), but if you can get the rate limit http headers, they contain a reset time & remaining calls in every response - those are handy to keep an eye on to avoid hitting the rate limit and wait an appropriate amount of time.

Make sure there’s no other thread or process or something else hitting that endpoint and using up the rate limit at the same time - that’s the only thing i can think of.

Application Only Auth as a “reserve” is another thing you can try:


@IgorBrigadir Thanks for your reply I solved my problem. I was writing the request in for loop that why I got error 429.