Thanks for providing that information, @macy_poc!
It turns out this account’s timezone is actually America/Los_Angeles:
$ twurl -H ads-api.twitter.com "/1/accounts/18ce54dd6nd" | jq
{
"request": {
"params": {
"account_id": "18ce54dd6nd"
}
},
"data_type": "account",
"data": {
"name": {name},
"business_name": null,
"timezone": "America/Los_Angeles",
"timezone_switch_at": "2013-05-22T07:00:00Z",
"id": "18ce54dd6nd",
"created_at": "2016-08-03T20:05:17Z",
"salt": {salt},
"updated_at": "2016-11-10T20:30:11Z",
"business_id": null,
"approval_status": "ACCEPTED",
"deleted": false
}
}
So, the offset should be -08:00Z. Thus, the following request is successful (of course, since I don’t have an actual campaign ID, the data array is empty):
$ twurl -H ads-api.twitter.com "/1/stats/accounts/18ce54dd6nd?placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT&start_time=2016-11-07T00:00:00-08:00Z&end_time=2016-11-08T00:00:00-08:00Z&granularity=DAY&entity=CAMPAIGN&entity_ids=abc123" | jq
{
"data_type": "stats",
"time_series_length": 1,
"data": [],
"request": {
"params": {
"start_time": "2016-11-07T08:00:00Z",
"segmentation_type": null,
"entity_ids": [
"abc123"
],
"end_time": "2016-11-08T08:00:00Z",
"country": null,
"placement": "ALL_ON_TWITTER",
"granularity": "DAY",
"entity": "CAMPAIGN",
"platform": null,
"metric_groups": [
"ENGAGEMENT"
]
}
}
}
Also works with time in the following format: 2016-11-07T08:00:00Z.
If this resolved the issue, please consider marking the thread as solved.