I am getting this error when trying to create subdomain using ovh API in laravel code.
POST https://eu.api.ovh.com/1.0/domain/zone/mondomain.com/record resulted in a 400 Bad Request response: {"message":"Invalid signature","httpCode":"400 Bad Request","errorCode":"INVALID_SIGNATURE"}
My PHP code looks like :
$ovh = new Api(
$applicationKey, // Application Key
$applicationSecret, // Application Secret
'ovh-eu', // Endpoint of API OVH Europe (List of available endpoints)
$consumerKey
); // Consumer Key
$result = $ovh->post(
'/domain/zone/mondomain.com/record',
array(
'fieldType' => 'A', // Resource record Name (type: zone.NamedResolutionFieldTypeEnum)
'subDomain' => 'test-sousdomain', // Resource record subdomain (type: string)
'target' => 'monIP', // Resource record target (type: string) ssh root@
'ttl' => '0', // Resource record ttl (type: long)
)
);
return $result;
Thank for your help.