使用Google API服务帐户共享打印机 [英] Share printer with Google API Service Account

查看:131
本文介绍了使用Google API服务帐户共享打印机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以与Google API服务帐户( https://developers.google.com/account/docs/OAuth2ServiceAccount )?

Is it possible to share a GCP printer with a Google API service account (https://developers.google.com/accounts/docs/OAuth2ServiceAccount)?

我试图与客户的电子邮件地址( id@developer.gserviceaccount.com )共享打印机,但是在API调用/search的响应中未显示打印机. 调用/submit会导致错误(用户无权访问)

I tried to share the printer with the client email address (id@developer.gserviceaccount.com), but the printer is not shown in the response to the API call /search. Calling /submit leads to an error (User has no access)

推荐答案

我相信您遇到了" 待处理 "问题.
也就是说,您确实与 id@developer.gserviceaccount.com 帐户共享了打印机,但另一个用户(在本例中为 id@developer.gserviceaccount.com )必须接受共享打印机的邀请.

I believe you are encountering the "is pending" problem.
Namely, you did share your printer with the id@developer.gserviceaccount.com account but the other user (in this case id@developer.gserviceaccount.com) has to accept the invitation to share the printer.

您可以通过发出/print请求进行检查,然后会看到

You can check this by issuing the /print request and you will see an

"is_pending":是

"is_pending": true

在这种情况下,access部分中为您的用户( id@developer.gserviceaccount.com )中的

元素.

element in the access section for your user (id@developer.gserviceaccount.com) in this case.

不用说,将此元素设置为true的帐户无法打印-因此,用户未被授权".消息.
我知道无法接受给定服务帐户的邀请,但是有一种解决方法:

Needless to say that accounts that have this element set to true cannot print - hence the "User is not authorized." message.
I know no way to accept the invitation for the given service account however there is a workaround:

  1. 您可以使用可以接受共享打印机的帐户(例如您的gmail帐户)创建一个私有的Google网上论坛.
  2. 然后将服务帐户("id@developer.gserviceaccount.com")添加到组等.您可以使用服务帐户进行打印;).

共享打印机时,必须与Google网上论坛共享(使用网上论坛的电子邮件地址,您可以在网上论坛管理控制台中的某个位置),并且网上论坛管理员(例如您的gmail帐户)必须接受整个邀请团体.

When you share the printer you must share it with the google group (use the group's email address which you can find somewhere in the group management console) and the group manager (e.g. your gmail account) must accept the invitation for the whole group.

有关创建组的更多信息,请参见此处.
> 我已经使用GAE服务帐户尝试过此方法,并且该方法有效.如果您需要任何澄清,请随时询问.祝你好运.

More info on how to create the group can be found here.
I have tried this with a GAE service account and it works. If you need any clarification do not hesitate to ask. Good luck.

这篇关于使用Google API服务帐户共享打印机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆