The INVALID_SIGNATURE
means some parameters are missing or are some values are not matching the requested parameters type (string
, long
etc.)
In your case, the parameters ttl
needs to be a long
, but you gave it a string
.
It should be better with:
$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)
));
The only difference here is the '0'
vs 0
(without the simple quotes)
The signature can be found here: https://api.ovh.com/console/#/domain/zone/%7BzoneName%7D/record#POST
If you execute your request through this API console, in the Raw
tab you can see the generated request:
{
"fieldType": "A",
"subDomain": "test-sousdomain",
"target": "monIp",
"ttl": 0
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…