访问未配置目录服务帐户的Api呼叫

时间:2018-06-08 05:53:16

标签: google-admin-sdk mdm google-directory-api admin-sdk

我想使用服务帐户凭据调用任何api方法。我使用了生成的服务帐户(ESA)中的access_token。当我拨打user.get 请求时,我收到以下错误:

"error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. Admin Directory API has not been used in project 780797239996 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/admin.googleapis.com/overview?project=780797239996 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "extendedHelp": "https://console.developers.google.com/apis/api/admin.googleapis.com/overview?project=780797239996"
   }
  ],
  "code": 403,
  "message": "Access Not Configured. Admin Directory API has not been used in project 780797239996 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/admin.googleapis.com/overview?project=780797239996 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
 }

然后我点击了该链接,我尝试在google开发者控制台中启用Admin Directory API,但下面有一个警告:

No "admin.googleapis.com" API or access to API
watch number: 12384231487

在控制台中没有这样的项目。我无法理解如何启用此API。

0 个答案:

没有答案