cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

domain register using the godaddy api

HI!

I'm trying to use the API to register domains but i'm getting an error message and I don't really understand what it means
I don't know if I have a syntax problem or something else.

I'm trying to do it with these:

POST URL https://api.ote-godaddy.com/v1/domains/purchase

$header = array (
    'Accept: application/json',
    'X-Shopper-Id: ' . $data_json['x-shopper-id'],
    'Authorization: sso-key ' . GODADDY_KEY . ':' . GODADDY_SECRET,
    'Content-Type: application/json'
);
$ch = curl_init();
$timeout = 60;
$json_body = json_encode$data_json['body'] );

curl_setopt$ch, CURLOPT_URL, $url );
curl_setopt$ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt$ch, CURLOPT_CONNECTTIMEOUT, $timeout );
curl_setopt$ch, CURLOPT_POSTFIELDS, $json_body  );
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 );
curl_setopt$ch, CURLOPT_POST, true );
$result = curl_exec$ch );

 

the error I'm getting is the following:

string(134) "string(47) "https://api.ote-godaddy.com/v1/domains/purchase" string(59) "{"code":"ERROR_INTERNAL","message":"Not Found : Not Found"}" "

 

I have verified the Json body multiple times, but if some one would like to take a look at it, I can send it in private

0 REPLIES 0