How to upload xlsx files to my own google drive, then convert them to google spreadsheet and get the shareable link programmatically?

为君一笑 提交于 2019-12-24 14:46:13

问题


I'm working on a node.js server. I want to upload and convert .xlsx files to google spreadsheet in my own google drive and then get the shareable link programmatically.

However, I found google drive api is specialized for building app for other users to access their drives to do something on your app but not for accessing your own drive programmatically. Do I understand this correctly?

I have read a lot of documents on google developers and some tutorial about this but I cannot find the way to what I want. Is there any way to do what I want? Could you give me some guidelines?


回答1:


You have misunderstood.

Drive uses oauth2 to handle the identification and authorisation of the target Drive account. Specifically, the Access Token "contains" (conceptually, not literally) the Id of the Drive account.

All of the published examples show how to obtain an access token for a third party user because that is the more common and more complex use case. Obtaining an access token for your own account is much easier.

See How do I authorise an app (web or installed) without user intervention? (canonical ?)



来源:https://stackoverflow.com/questions/27659723/how-to-upload-xlsx-files-to-my-own-google-drive-then-convert-them-to-google-spr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!