Cannot access the /stats/ part of the API


I’m having trouble accessing this Ads API endpoint:

The error response is:
“The client application making this request does not have access to this API”

I can access other endpoints like this one:

Could this be an issue with our application permissions for the /stats/ part of the API specifically?


Cannot access the /stats/ part of the API (Topic #2)
Stats endpoint errors (diagnosed?)

Hi @jonathansewell - is it just this one or are you not able to access any /stats/ endpoints?


Hi @jillblaz, I’ve tried a few more endpoints and get the same problem:


I can access the non-stats endpoints, for example:


By the way I’m in the UK so our time zones are probably completely out of sync… I’ll probably be out of the office when you get in! :earth_americas: :earth_africa: :earth_asia: :smile:


Hi @jonathansewell - no problem, I’m sure you can set some sort of alert on your phone to wake you up when I respond :wink:

I was able to successfully run this request from your account:

$ twurl -X GET -H "/0/stats/accounts/xxxxx/campaigns/xxx?start_time=2014-11-05T00:00:00Z&granularity=TOTAL" 

Try to run that with your account and campaign info and let me know what you see. Are you running this from your @jonathansewell handle?


Hi @jillblaz, yes I can run the request using twurl and that works fine :confused: I still get the error when I run it using my implementation.

For my implementation I’m using oauth with an application key/secret (belonging to a Brandwatch app). My account @jonathansewell owns the ads account and campaign. So I’m authorising the Brandwatch app to use my data via oauth.

Some of the ads API calls work with this implementation, but some give me that error about the application not being authorised.

I’m using node.js and the library like this:

    var oa = new OAuth(

Is there something specific about the oauth for the /stats/ api calls that I’ve missed?

Thanks again!



Hi @jonathansewell,

The fact that this works for you and Jill in twurl rules out an actual permission issues with your application. There is a bug right now in the API where some 401 (Not Authorized) errors are being returned incorrectly as 403 (Forbidden) errors and they look like app permissions issues.

It’s likely that the problem here is either an invalid access token or an issue in your application’s oauth implementation (eg. incorrect signature, malformed request, encoding issues, etc).

A few things:

  1. Can you post the full and raw HTTP request and response for one of the API calls that’s failing for you?
  2. Do the calls that succeed use the same access token as the calls that fail?


This topic was automatically closed after 12 hours. New replies are no longer allowed.