Error code 503: Service Temporarily Unavailable


#1

Hi,

We’re getting the below error when requesting Twitter Ads metrics. It seems to happen when we request segmentation. What does it mean? Should we retry the request?

thanks!

HttpResponseException: Failed to fetch twitter ads request: code 503 reason “Service Temporarily Unavailable” url “https://ads-api.twitter.com/0/stats/accounts/949uer?metrics=promoted_tweet_timeline_engagement_rate%2Cpromoted_tweet_search_url_clicks%2Cpromoted_tweet_search_replies%2Cpromoted_account_follows%2Cpromoted_tweet_search_engagement_rate%2Cpromoted_tweet_app_install_attempts%2Cpromoted_account_impressions%2Cpromoted_tweet_timeline_replies%2Cpromoted_tweet_search_clicks%2Cpromoted_account_profile_visits%2Cpromoted_tweet_search_engagements%2Cpromoted_tweet_search_impressions%2Cpromoted_tweet_timeline_card_engagements%2Cbilled_follows%2Cpromoted_account_follow_rate%2Cpromoted_tweet_timeline_retweets%2Cpromoted_tweet_search_follows%2Cpromoted_tweet_timeline_clicks%2Cpromoted_tweet_timeline_url_clicks%2Cbilled_engagements%2Cpromoted_tweet_search_favorites%2Cpromoted_tweet_timeline_follows%2Cpromoted_tweet_search_retweets%2Cpromoted_tweet_search_card_engagements%2Cpromoted_tweet_app_open_attempts%2Cpromoted_tweet_timeline_impressions%2Cpromoted_tweet_timeline_favorites%2Cpromoted_tweet_timeline_engagements&start_time=2012-01-01T00%3A00%3A00Z&segmentation_type=INTERESTS&end_time=2015-01-24T00%3A00%3A00Z&granularity=TOTAL” content “{“errors”:[{“code”:“SERVICE_UNAVAILABLE”,“message”:“Service unavailable due to request timeout; please try the request again later”}],“request”:{“params”:{}}}”


#2

Hi @TaliDolev,

Just from eyeballing this request, I’m guessing that you’re timing out due to the size of this request. Three years is a huge window. Try chopping this up into smaller increments.

Check out our Analytics Best Practices for more information on this topic.