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
- API keys WebGUI
20508
10.11.2023 11:25
- OVH Manager exceptionally slow
19110
19.04.2018 11:11
- How to completely close your OVH Account
18816
05.07.2019 14:26
- I cannot complete registration
17827
10.01.2022 13:34
- Hubic issues downloading files and backup archives
15049
17.04.2018 11:12
- Remove / Change API Token
14140
27.10.2022 14:36
- DMARC record, available or not?
13965
18.07.2018 09:10
- [Beta] Experience the New OVHcloud Control Panel!
13914
05.02.2026 13:18
- Plesk server update error - Help
13131
20.07.2020 08:11
- Oops! An error has occurred creating the account
11883
01.04.2020 17:59