问题标签 [google-admin-sdk]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2148 浏览

google-admin-sdk - How to create a user with the Admin Directory api using the google-api-ruby-client?

I've been trying a few combinations but can't seem to come up with something that works. More information about the API I'm asking about can be found here https://developers.google.com/admin-sdk/directory/v1/reference/users/insert . I have a feeling I'm just not setting up the request correctly. The following bit of code is known to work. I use it to set up the client that is able to query all the users.

When I try to use the following code

I always get back the same error "code": 400, "message": "Invalid Given/Family Name: FamilyName"

I've observed a few things while looking into this particular API. If I print out the parameters for both the list and the insert functions e.g

Only the List actually displays the parameters

This leaves me wondering if the ruby client is unable to retrieve the api and therefore unable to submit the request correctly or if I'm just doing something completely wrong.

I'd appreciate any idea's or direction that might help set me on the right path.

Thank you,

James

0 投票
2 回答
5429 浏览

google-api - 报告 API 503 后端错误

在过去的几周里,我用来从 Reports API 检索用户使用情况报告的批处理任务一直失败,并出现以下响应:

有没有其他人看到这个错误?似乎是 API 的内部错误。我能做些什么来避免这个问题吗?谢谢!

0 投票
3 回答
1684 浏览

google-admin-sdk - 目录 API:非 Google 帐户的删除成员 API 操作失败

我们注意到,如果群组成员不是 Google 帐户,则无法使用新的 Directory API 移除群组成员。我们已经使用 Dito GAM(注意我是 GAM 的作者)和 Google API Explorer 对此进行了测试。

如果要删除的成员是 Google 帐户,则操作正常:

这是预期的行为。但是,如果要删除的帐户不是 Google 帐户(Google Apps 或消费者),则会返回错误:

请注意,Google API Explorer 中也会显示相同的行为:

http://screencast.com/t/fQZCnMYYs

https://developers.google.com/apis-explorer/#s/admin/directory_v1/directory.members.delete?groupKey=group99%2540jay.powerposters.org&memberKey=not-a-google-account%2540not-a-google -domain.com&_h=1&

应该可以通过 Directory API 从 Google Group 中删除任何地址

0 投票
1 回答
58 浏览

google-admin-sdk - 目录组:经销商帐户始终为经销商而不是客户获取组

根据Directory API Prerequisites,转销商应该能够针对其客户的 Google Apps 实例执行 API 调用(移动设备和 Chrome 设备调用除外)。这是通过指定客户的customerId属性而不是经销商(或通用my_customer)的属性来完成的。

我发现虽然在执行组 API 调用时,即使指定了客户的customerId,我也会得到经销商域的结果,而不是客户的结果。对于 groups.list() 操作,它似乎customerId完全被忽略了。如果我指定domain属性而不是customerId,我会取回该客户域的组,但这对于我可能不知道所有客户域(并且无法发现所有域)的多域客户没有帮助。

有其他人遇到这个问题还是我做错了什么?

0 投票
1 回答
586 浏览

ruby-on-rails - Google Apps 与 Ruby on Rails 的集成

我有一个其他公司用于其 Google Apps 帐户的 RoR 应用程序。是否有 gem 或其他方式来提取公司的用户数据,例如提取所有员工姓名和电子邮件地址的列表。

我怎样才能做到这一点?

0 投票
1 回答
163 浏览

google-admin-sdk - Google Admin SDK 目录成员补丁错误 500

我正在将 oauth 操场用于目录成员更新工具https://developers.google.com/admin-sdk/directory/v1/reference/members/patch

每当我尝试更新组中的现有成员时,都会遇到错误 500 消息。这是一个暂时的问题还是我错过了什么。

生成请求时,我为补丁主体提供 groupKey、memberKey 和 role:MEMBER。如果我为 Update 函数提供完全相同的参数,那么一切正常。

谢谢你。

詹姆士

0 投票
4 回答
13254 浏览

google-api - Google Directory API returns Not Authorized when call users().list().execute()

I need to read the list of users (and groups) from my google domain.

So I went to my Google APIs Console and enabled Admin SDK and created a Service Account to call Google APIs. I use the following google libraries

  • google-api-services-admin-directory_v1-rev11-1.16.0-rc.jar
  • google-api-client-1.16.0-rc.jar

My code is

And I receive this on the last line

Error

If I uncomment the commented line (.setServiceAccountUser("admin@mydomain.org")) then I get a different error

My account (admin@mydomain.org) is a super administrator. I suspect the Service Account needs to be granted access for the users API scope. But I can not find where I can grant this access. I have a classic UI mode of my Google CPanel. And I don't have "Manage client API access" page in the Advanced tools.

Advanced tools

Also I'm not sure what I should use as an Application Name at .setApplicationName("Test").

Thanks for any help

0 投票
1 回答
228 浏览

google-api-java-client - 如何在 google Admin SDK 结果中获取 etag?

如果我在 Java 中使用 google admin SDK,有谁知道如何轻松检索 etag 标头。我主要使用目录 API。但由于某种原因,返回的对象不提供 Etag 信息。这可以非常方便地避免在服务器上未更改数据的情况下检索某些信息。(例如,如果用户没有被修改)谢谢

0 投票
1 回答
1267 浏览

python - 调用 Reports API v1 时出错

调用 Reports API 时出现错误:

有没有人见过这个错误?我错过了什么?我只是不明白为什么会显示或我应该检查什么。

问候。

编辑:

授权:

实际调用:

其他 API 可以很好地与该服务帐户配合使用。' https://www.googleapis.com/auth/admin.reports.usage.readonly ' 已正确添加到 OAuth2 域配置页面。

0 投票
1 回答
777 浏览

google-admin-sdk - 有没有办法获得有关 Google Voice 使用情况的报告?

有没有一种方法可以利用 Google API 来获取有关我的域中 Google Voice 使用情况的报告?我们刚刚打开它,想看看我们的用户是否在使用该服务。