GET stats/accounts/:account_id giving me 401 Unauthorized Access


#1

i’m using the same exact credentials for this request as i’m using for several other requests in the ads api (such as: GET accounts, GET accounts/:account_id, GET accounts/:account_id/campaigns, GET accounts/:account_id/funding_instruments, GET insights/accounts/account_id), but only this one is giving me problems.

here is an example of the request i’m making:
https://ads-api.twitter.com/2/stats/accounts/18ce54d4x5t?entity=CAMPAIGN&entity_ids=6s40g&start_time=2016-12-14T12:21:00Z&end_time=2016-12-15T12:21:00Z&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=BILLING

and i’m receiving:
{
“errors”: [
{
“code”: “UNAUTHORIZED_ACCESS”,
“message”: “This request is not properly authenticated”
}
],
“request”: {
“params”: {}
}
}

happy to provide my credentials in a secure channel if necessary, but like i said, the exact same credentials are working as expected for every other endpoint i’ve tried.

thanks for the help!


#2

This looks like it may be the same as this issue - can you check your date format and see if that changes anything?


#3

yes. great, that was it. so we can’t query on more granular than day time frame?


#4

@eepranskee: Please see this post.