使用Google Apps Domains API

时间:2016-01-13 15:20:17

标签: google-api google-apps

我正在使用Google Apps而我正在尝试将域别名添加到我拥有的辅助域名中。

根据此Google Apps blog article" [domains] API允许您以编程方式为任何域(主要或辅助域)添加别名,但辅助域的别名只能通过API添加。"

我在the APIs explorer(页面底部)上尝试了API,但只设法将域别名添加到我的主域,而不是我的辅助域。

使用POST方法我尝试过:

{
 "domainName": "alias.domain.com",
 "domainAliases": [
  {
   "parentDomainName": "secondary.domain.com",
   "verified": true
  }
 ]
}

对此事的任何启示都将不胜感激。

此致

1 个答案:

答案 0 :(得分:4)

您需要使用DomainAliases API:

https://developers.google.com/admin-sdk/directory/v1/reference/domainAliases/insert

从那里输入:

customer = your immutable ID
domainAliasName = the alias to add
parentDomainName = the secondary domain to which you want to add an alias

应该是它。

相关问题