Google Drive API获取文件编辑网址 [英] Google Drive API get file Edit URL

查看:156
本文介绍了Google Drive API获取文件编辑网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

截至2015年4月20日,Google Documents API v3.0已过时,并且在此日期之后不再起作用。因此,使用此API的任何人都必须切换到使用Google Drive API。



我已将Google Drive API集成到我的PHP应用程序中,但我无法找到如何获得我创建或上传的文件的编辑网址。之前在上传文件后的Google Documents API中,响应会返回一个编辑网址,它将成为编辑文件的直接网址。



我正在使用服务帐户在 https://console.developers.google.com 上使用我的Google开发者帐户生成的密钥。这意味着我的应用程序正在代表我的开发人员帐户为我创建的服务帐户拨打电话。 Google云端硬盘服务帐户无法通过云端硬盘用户界面访问,因为作为用户,您无法像登录个人Google帐户一样登录该帐户。



我的已完成的工作是共享我的文档,我已经上传或使用我的个人帐户创建,并且在调用中谷歌返回的网址被命名为alternateLink,它的格式如下:
https://docs.google.com/file/d/0B0nkjw07ekP9LUpuZG4tOHcxdkE/edit?usp=drivesdk <然而,当我登录到帐户时,我分享了上述文件,它只是发送给查看者,而不是Google文档编辑器。


$ b
$ b $ b

如何使用Google Drive API获取文件的修改链接? 您使用的链接是正确的,所以这不是问题。

As of 04/20/2015 the Google Documents API v3.0 is deprecated, and will no longer function function on and after this date. So anyone using this API must switch to use the Google Drive API.

I have integrated the Google Drive API into my PHP application, but I can not find how to get a EDIT url for a file I have created or uploaded. Previously in the Google Documents API after uploading a file, the response would return a edit url that would be a direct url to edit the file.

I am using a service account that uses a generated key by my google developers account at https://console.developers.google.com. This means my application is making calls on behalf of my service account the developer account has created for me. A google drive service account CAN NOT be accesses by the Drive UI, because as a user you can not login to the account as you would a personal google account.

What I have done is shared my documents I have uploaded or created with my personal account, and the url google returns in the call is named "alternateLink" and it is formatted as such: https://docs.google.com/file/d/0B0nkjw07ekP9LUpuZG4tOHcxdkE/edit?usp=drivesdk

However when logged into the account I shared the above file with, it just goes to a viewer and not the "Google Docs Editor"

How can I get a file's edit link with Google Drive API?

解决方案

The link you are using is correct, so that's not the issue.

这篇关于Google Drive API获取文件编辑网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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