【问题标题】:Google Directory Admin API in "Try it now" and "API explorer", always returns "Bad request"“立即尝试”和“API 资源管理器”中的 Google Directory Admin API 始终返回“错误请求”
【发布时间】:2015-10-14 07:32:33
【问题描述】:

如果我尝试其他 API 的 API 请求,它似乎工作正常,或者至少 - 返回有意义的错误响应。

但是对于Admin API,它总是返回“Bad request”,例如:https://developers.google.com/apis-explorer/#search/customer/m/admin/directory_v1/directory.domains.list

我已经设置了所有 API 访问权限,但仍然 - 不走运。 例如。: 此请求(使用我正确的 Google Apps 域名)

总是返回:

400 正常

- Show headers -

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "badRequest",
    "message": "Bad Request"
   }
  ],
  "code": 400,
  "message": "Bad Request"
 }
}

【问题讨论】:

    标签: google-api


    【解决方案1】:

    这是我最终找到解决方案的地方。一步一步的指导,我在其他任何地方都找不到。诀窍在于正确的变量值:

    How to Change Primary Domain in Google Apps

    来源:

    1. 登录到您的 Google Apps 控制面板。
    2. 浏览至Google Apps API 您更改客户信息的页面。确保在右上角看到您的管理员电子邮件地址。
    3. 点击“立即试用”链接。
    4. 在“customerKey”字段中输入“my_customer”。
    5. 在“字段”字段中输入“customerDomain”。
    6. 点击“Request body”字段,会出现一个下拉框并选择“customerDomain”。
    7. 在新出现的字段中,输入您要更改为主域的辅助域
    8. 最后点击蓝色的“授权并执行”按钮。

    该过程完成后,您的辅助域将转换为主域,反之亦然。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-16
      • 2015-12-28
      • 1970-01-01
      • 2021-03-29
      • 2013-07-18
      • 1970-01-01
      • 2018-10-20
      • 2018-08-07
      相关资源
      最近更新 更多