I'm trying to use the OVH API to allow me to create a new domain. So I got the Application Key (AK) the Application Secret (AS) and the Consumer Key (CK) for "GET/" "PUT/" "POST/" and "DELETE/".
Here is the code that I'm trying to use:
$client = new Api($this->applicationKey, $this->applicationSecret, $this->apiEndpoint, $this->consumerKey);
$result = $client->post('/domain/zone/' . $this->zoneName . '/record', [
'fieldType' => 'A',
'subDomain' => $subdomain,
'target' => $elementIp,
'ttl' => 0,
]);
$client->post('/domain/zone/' . $this->zoneName . '/refresh');
In this code $subdomain and $elementIp are strings. jbbatteryportugal.com/
Now the problem is that when I try this I receive this response: {"message":"This call has not been granted","httpCode":"403 Forbidden","errorCode":"NOT_GRANTED_CALL"}
Can someone let me know what I do wrong please ?
EDIT: I finaly found my problem. I use docker and when I changed the AK, AS and CK I didn't restart the container. Now it works very well.
Why do I get this response on OVH API?
Related questions
- How to completely close your OVH Account
6636
05.07.2019 14:26
- OVH Manager exceptionally slow
4137
19.04.2018 11:11
- Hubic issues downloading files and backup archives
4120
17.04.2018 11:12
- DMARC record, available or not?
3440
18.07.2018 09:10
- API keys WebGUI
2668
10.11.2023 11:25
- Plesk server update error - Help
2570
20.07.2020 08:11
- Oops! An error has occurred creating the account
2488
01.04.2020 17:59
- Didn't receive forgot password email
2425
27.07.2018 03:39
- Azure Stack - App Service
2376
19.10.2017 08:28
- Kubernetes / K8s
2364
21.10.2017 13:43