Why cloudflare keeps on saying 400 bad request?

I tried to send following request to cloudflare api

var client = new RestClient
BaseUrl = new Uri(url)

var request = new RestRequest("", Method.GET);

request.AddHeader(“X-Auth-Email”, “[email protected]”);
request.AddHeader(“X-Auth-Key”, “c1a9xxx”);
request.AddHeader(“Content-Type”, “application/json”);

no matter how I try, I always got this error message:

  "code": 1010,
  "message": "auth.forbidden"

I am sure that I put the right email and key in. Was there anything I missed? Is it possible that my account doesn’t have permission to run this API query?


That’s an Enterprise plan feature. Are you on an Enterprise plan?


1 Like

hi, I see.

Some of our sites are labelled “enterprise website”, and the one I queried is “business website”. So it means that site is not on enterprise plan?


Correct. And that would account for the 400 error.