Hello, I have a problem with the ovh api, I would like to integrate in our CRM the possibility of renewing domains directly using the API, following the guides I am trying this script to renew the service linked to a domain but I receive an error.
{"message":"[services] ServiceId Data is not an array for an array type"}
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;
$ovh = new Api( $applicationKey,
$applicationSecret,
$endpoint,
$consumer_key);
//$result = $ovh->get('/service/14991863/renew', array(
// 'includeOptions' => false, // Include service's option(s) (type: boolean)
//));
try {
$result = $ovh->post('/service/14991863/renew', array(
'dryRun' => false, // Indicates if renew order is generated (type: boolean)
'duration' => 'P1Y', // Renew duration (type: string)
'services' => '[14991863]', // List of services to renew (type: long[])
));
} catch (GuzzleHttp\Exception\ClientException $e) {
$response = $e->getResponse();
$responseBodyAsString = $response->getBody()->getContents();
echo $responseBodyAsString;
}
General Chat - Problem api post renew domain
Related questions
- API keys WebGUI
21142
10.11.2023 11:25
- OVH Manager exceptionally slow
19669
19.04.2018 11:11
- How to completely close your OVH Account
19272
05.07.2019 14:26
- I cannot complete registration
18320
10.01.2022 13:34
- Hubic issues downloading files and backup archives
15453
17.04.2018 11:12
- Remove / Change API Token
14642
27.10.2022 14:36
- DMARC record, available or not?
14508
18.07.2018 09:10
- [Beta] Experience the New OVHcloud Control Panel!
14198
05.02.2026 13:18
- Plesk server update error - Help
13575
20.07.2020 08:11
- Oops! An error has occurred creating the account
12204
01.04.2020 17:59