0

我需要在我的旧 google for business 帐户上使用 Google Groups API 修改组设置。我使用网络请求:

PUT
https://www.googleapis.com/groups/v1/groups/<group_id>
request body: {
    "whoCanPostMessage": "ALL_MEMBERS_CAN_POST"
}
headers: {
    'Content-type': 'application/json; charset=UTF-8',
    'Authorization': 'Bearer <access_token>
}

但是服务器返回:

<Response [401]>
{
  "error": {
    "errors": [
      {
        "domain": "global",
        "reason": "authError",
        "message": "Domain cannot use Api, Groups service is not installed.",
        "locationType": "header",
        "location": "Authorization"
      }
    ],
    "code": 401,
    "message": "Domain cannot use Api, Groups service is not installed."
  }
}

即使我启用了组并且我可以从管理控制台使用此服务。(但是,Directory API 确实有效)
当我创建一个新的虚拟帐户进行测试时,一切都可以无缝运行。
如何解决此问题并在我的旧帐户中使用 API?

4

1 回答 1

0

要使用 Groups Settings API,您需要启用 Groups for Business

于 2016-02-11T11:48:58.993 回答