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
19012
10.11.2023 11:25
- OVH Manager exceptionally slow
17745
19.04.2018 11:11
- How to completely close your OVH Account
17713
05.07.2019 14:26
- I cannot complete registration
16534
10.01.2022 13:34
- Hubic issues downloading files and backup archives
14216
17.04.2018 11:12
- Remove / Change API Token
13353
27.10.2022 14:36
- DMARC record, available or not?
13120
18.07.2018 09:10
- Plesk server update error - Help
12295
20.07.2020 08:11
- [Beta] Experience the New OVHcloud Control Panel!
11937
05.02.2026 13:18
- Oops! An error has occurred creating the account
11259
01.04.2020 17:59