Accounts API Endpoint v4 fails to authenticate

Looking to create a tool that will allow me to create IP blocks for my domains on the fly, but I’m getting stuck just trying to authenticate against the API.

I’m using php on my side, but I can’t see where I could be passing bad data.

Hoping someone could take a look at what I have and provide some guidance:

$IP = $_REQUEST[‘ip’];
$url =“”;

$fields = array(
‘notes’=>'Blocked for suspected abuse on '.date(“m/d/y”)

$blockData = json_encode($fields);

$headers = [

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true); 
$result     = curl_exec($ch);

when I print the results, I always receive the same error:

{“success”:false,“errors”:[{“code”:10000,“message”:“Authentication error”}]}

I have confirmed multiple times that I am using the correct account email and the correct global key (reset the key twice to be sure) and I’m still getting an “Authentication error”. The total lack of description is a little frustrating.

Hoping someone has seen this before and I’m just missing something obvious.

Thanks for any insight you can provide!

1 Like

Same here :frowning:


I am also experiencing same issue .
getting error
{“success”:false,“errors”:[{“code”:10000,“message”:“Authentication error”}]}
curl: (3) Port number ended with ‘a’