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”
]
}
}
}