Stats Account v1


#1

twurl -H ads-api.twitter.com “/1/stats/accounts/18ce54ahyak” -d “entity_ids=4bnmy&entity=CAMPAIGN&end_time=2015-03-04T00:00:00Z&granularity=TOTAL&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER&start_time=2015-02-26T15:00:00Z”

result is

{“errors”:[{“code”:“METHOD_NOT_ALLOWED”,“message”:“Method POST not allowed.”}],“request”:{“params”:{}}}

Could someone please help to tell me what is wrong?


#2

Hi @aminmonster703,

I think the error message is really clear… you’re using a POST method to retrieve statistics, you should use a GET method.

Regards


#3

Thanks! Works with below…

twurl -H ads-api.twitter.com “/1/stats/accounts/18ce54ahyak?entity_ids=4bnmy&entity=CAMPAIGN&end_time=2016-03-04T00:00:00Z&granularity=TOTAL&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER&start_time=2016-02-26T00:00:00Z”


#4

Hi @aminmonster703! If the issue has been solved, please don’t forget to mark the answer with the solution as the solution of this topic. :slight_smile: