GoDaddy API 创建子域 returns "The given domain is not registered, or does not have a zone file"

GoDaddy API to create subdoman returns "The given domain is not registered, or does not have a zone file"

我正在尝试使用 GoDaddy 的 API 通过以下 http 请求创建子域:

PATCH /v1/domains/domainName.com/records
Host: api.ote-godaddy.com
Authorization: sso-key API_KEY:API_SECRET
Content-Type: application/json
Content-Length: 100

[
  {
    "data": "111.111.111.111",
    "name": "subdomainName",
    "ttl": 6000,
    "type": "A"
  }
]

但我收到以下回复:

{
    "code": "UNKNOWN_DOMAIN",
    "message": "The given domain is not registered, or does not have a zone file"
}

我发现这些请求只能使用针对生产的生产授权 url 但不会使用针对 ote url 的 ote 授权。也许 url 必须设置为 ote 域而不是生产域。不确定。

请将主机名更改为 https://api.godaddy.com。您的请求将仅用于生产 URL.

请生成生产级别 API 密钥和机密。

正文:(原始 - Json 类型)

[ { "data": "你的服务器IP", "name": "子域名", “端口”:80, “优先级”:10, “协议”:“字符串”, “服务”:“字符串”, “ttl”:600, “类型”:“A” } ]

注:

只有当您的 go daddy 帐户中已经存在主域时才会发生这种情况