Invalid Time Window - March 9, 2016


#1

Invalid Time Window - Twitter calculates the start date to midnight, but any start date before 2016-03-09 will cause this error.

twurl -X POST -H ads-api.twitter.com “/1/stats/jobs/accounts/3451ke?granularity=TOTAL&start_time=2016-02-28&end_time=2016-06-07&entity=ACCOUNT&entity_ids=3451ke&metric_groups=ENGAGEMENT,BILLING&placement=ALL_ON_TWITTER”

I get the following error
{
“errors”: [
{
“code”: “INVALID_TIME_WINDOW”,
“message”: “The end_time (2016-06-07 06:00:00 +0000) can be a maximum of 90.days+1.hours after the start_time (2016-02-28 07:00:00 +0000)”,
“parameter”: “”
}
],
“request”: {
“params”: {
“start_time”: “2016-02-28T07:00:00Z”,
“entity_ids”: [
“3451ke”
],
“end_time”: “2016-06-07T06:00:00Z”,
“placement”: “ALL_ON_TWITTER”,
“account_id”: “3451ke”,
“granularity”: “TOTAL”,
“entity”: “ACCOUNT”,
“metric_groups”: [
“ENGAGEMENT”,
“BILLING”
]
}
}
}


#2

I don’t really understand what are you expecting.

If you select end_date 2016-06-07, 90 days before (max time-window) is 2016-03-09, you’ve setted it as 2016-02-28, so the error is normal.

Regards.


#3

Well version 0 said it had a 30 day time window but I was able to chunk out my calls into 30 day increments and retrieve data for time ranges greater than 30 days. I was expecting the same behavior with version 1.


#4

Hi @1kon1k! Well, you can do it the same as in v0… manually.