503 Service Unavailable for particular account



I am always getting 503 error when I try to pull campaiogns for this account 18ce547jz5z
Here is the resource and params of the query
resource: "https://ads-api.twitter.com/1/accounts/18ce547jz5z/campaigns"
params: {:with_deleted=>true, :sort_by=>“standard_delivery-desc,updated_at-desc”}

Here is my request
TwitterAds::Request.new(client, :get, resource, params: params).perform

Here is the response I get
code=503 details="[{:code=>“SERVICE_UNAVAILABLE”, :message=>“Service unavailable due to request timeout; please try the request again later”}]">

This has been happening since 2017-03-29 00:00:00 PST everytime I run the task. It fails for this account 18ce547jz5z


Can someone please reply to this? We are running blind on our twitter campaigns.


@kamalptw: Thanks for reaching out. The timeout is likely do to the fact that this is an expensive request due to the sorting. One suggestion is to add the count parameter with something relatively small, like 10 or 25 and see how that goes. We were able to make several successful requests with that.


@kamalptw: Did this help resolve the issue?


Yes, Thanks Juan, yes its fine now.


Thanks for letting us know, @kamalptw!