无法访问谷歌驱动器文件与服务帐户 [英] Not able to access google drive Files with service account

查看:178
本文介绍了无法访问谷歌驱动器文件与服务帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用服务帐户在Google云端硬盘中上传文件,我可以在Google云端硬盘中插入文件,但我无法在Google云端硬盘中查看该文件。



我创建了ABC@gmail.com。用ABC@gmail.com创建一个服务帐户。使用P12证书和服务客户​​端电子邮件ID,我可以将文件插入驱动器。但无法在ABC@gmail.com的Google驱动器中看到该文件。从应用程序中捕捉文件列表时,它将显示5个文件,但在我的ABC@gmail.com的驱动器中只包含1个文件。



问题


  1. 如何在服务的Google云端硬盘上看到我上传的文件账户

  2. 文件已成功上传,然后如何查看
    ABC@gmail.com的Google云端硬盘中的文件

$ b $服务帐户有一个独立的驱动器(以及其他所有内容),只能通过api查看,而不能通过web界面查看。
您为什么使用服务帐户?这对于其他情况。
在该gmail账户上使用常规的3段oauth来获取其刷新标记,以便您可以将其作为所有者。
否则请继续做你正在做的事情,但也可以与该电子邮件分享,以便您可以在该驱动器的与我共享中看到它。


I am working on Upload file in Google drive with Service Account, I am able to insert file in Google Drive, but I am not able to view that file in Google Drive.

I am create ABC@gmail.com. create a service account with ABC@gmail.com. with the P12 certificate and Service Client Email id, I am able to insert file in drive. But not able to seen that file in ABC@gmail.com's Google drive. While fatch the list of files from application it will show 5 files but in my ABC@gmail.com's drive contains only 1 file.

Question

  1. How can I see my uploaded file on google drive with service account
  2. File is successfully uploaded then how can I see the files in ABC@gmail.com's Google Drive

解决方案

Service account has a separate drive (and everything else) that can only be seen through api, not the web interface. Why are you using a service account? Thats for other cases. Use regular 3-legged oauth on that gmail account to get its refresh token so you can put it there as Owner. Otherwise keep doing what you are doing, but also share it with that email so you can see it on that drive's 'shared with me'.

这篇关于无法访问谷歌驱动器文件与服务帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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