I am making a domain purchase call via the godaddy API. I have been successful purchasing a domain on their test environment: https://developer.godaddy.com/doc/endpoint/domains
$bodyContent=json_encode($bodyContent);
$ch = curl_init();
$timeout=60;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_POSTFIELDS, $bodyContent);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
$result = curl_exec($ch);
$dn = json_decode($result,true);
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
dd($http_status);
The URL endpoint:
$url = "https://api.ote-godaddy.com/v1/domains/purchase";
When i now try and do this on laravel and dd(http_status)
i get a 404
error. I can provide more details on the $bodyContent
but for now just know the same variable works fine in the godaddy environment. I am new to curl so something must be wrong in the above code snippet