api - 为什么我会在 OVH API 上收到此响应?
问题描述
我正在尝试使用 OVH API 来允许我创建一个新域。所以我得到了“GET/ ”“PUT/ ”“POST/ ”和“DELETE/ ”的应用程序密钥(AK)、应用程序密钥(AS)和消费者密钥(CK)。
这是我尝试使用的代码:
$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');
在此代码中 $subdomain 和 $elementIp 是字符串。
现在的问题是,当我尝试此操作时,我收到此响应: {"message":"This call has not been granted","httpCode":"403 Forbidden","errorCode":"NOT_GRANTED_CALL"}
有人可以让我知道我做错了什么吗?
编辑:我终于找到了我的问题。我使用 docker,当我更改 AK、AS 和 CK 时,我没有重新启动容器。现在它工作得很好。
解决方案
推荐阅读
- c++ - Rcpp 项目清理和重建
- ruby - 如何使用带有更多字母的 gsubstitution
- python - 张量流错误。TypeError:张量对象仅在启用急切执行时才可迭代。要迭代此张量,请使用 tf.map_fn
- php - 检查 MySQL 查询是否具有布尔值并显示 ✓ 或 ✖
- pointers - 在汇编中,使用“mov/lea”时是否总是需要指定“DWORD/WORD/BYTE...”?
- postgresql - Postgres 的循环依赖
- bash - 如何避免在 bash 参数扩展中出现“找不到命令”?
- office365 - 如何以编程方式找到 Office 365 发行版?
- c# - Azure Active Directory 为 API 调用返回 203
- php - Rest API:保存一个值以供合理数量的并发用户以后使用