For Workes & Pages, what is the name of the domain?
What is the error number?
400
What is the error message?
Invoke-RestMethod : The remote server returned an error: (400) Bad Request
What is the issue or error you’re encountering
400 Error when using the X-Auth-Email and X-Auth-Key headers for Zone Lockdown API call
What steps have you taken to resolve the issue?
Tried various combinations of the X-Auth-Email and X-Auth-Key headers but always receive a 400 error when using them for this API
What are the steps to reproduce the issue?
Built the headers as follows:
$headers = @{}
$headers.Add(“Content-Type”, “application/json”)
$headers.Add(“X-Auth-Key”, “abcdefghijklmnop”)
(have tried with and without adding $headers.Add(“X-Auth-Email”, “[email protected]”) )
Run the following API request:
$response = Invoke-RestMethod -Uri ‘https://api.cloudflare.com/client/v4/zones/correct zone id here/firewall/lockdowns’ -Method GET -Headers $headers